Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

What you need to know about the new Next.js router

Blog post from LogRocket

Post Details
Company
Date Published
Author
Marie Starck
Word Count
1,449
Language
-
Hacker News Points
-
Summary

Since its launch in 2016, Next.js has utilized a page-based approach for routing, enabling developers to dictate the rendering strategy for each page. Despite its utility, this method posed challenges, particularly in sharing state or layouts among nested routes. Responding to feedback, Vercel, the creator of Next.js, announced significant updates to the router, including support for nested routes and layouts, client and server routing, and features from React 18 like startTransition and Suspense. The new router is designed for server components and allows incremental adoption, aiming to address limitations by introducing a new 'app' folder structure that provides backward compatibility and separates routes from non-route components. Additionally, it simplifies layout management by allowing a single layout file to automatically apply to all nested routes, and it supports data fetching at the layout level. These enhancements are part of a broader evolution that includes a pending RFC to incorporate more advanced features, and Vercel plans additional communication to further elaborate on these changes.