Photo by Daniela Cuevas on Unsplash

Next.JS 14 Tips You Need to Know in 2024

Tip 1: Leverage Middleware for Authenticated SSR Routes Next.js 14 enhances middleware capabilities, allowing developers to handle authentication more efficiently at the server side. Instead of traditional methods of guarding routes, use middleware to intercept requests and validate authentication tokens before rendering. This reduces unnecessary client-side checks and streamlines the SSR process. Use Case: Secure an admin dashboard route to render server-side based on user roles. 1 2 3 4 5 6 7 8 9 10 11 12 // middleware....

May 8, 2024 · 5 min · Helder Esteves
Photo by Danist Soh on Unsplash

Understanding the Basics of React Architecture

Frontend architecture has evolved significantly with the introduction of modern frameworks and tools. At its core, a clean and scalable architecture enables your team to manage increasingly complex systems and growing user demands with ease. Here are some fundamental strategies to keep in mind: Modularity: Break down the application into smaller, reusable, and replaceable modules. Consistency: Adopt a consistent coding style and use shared components and design patterns. Scalability: Design with future expansion in mind....

April 22, 2024 · 4 min · Helder Esteves