Server-First Rendering Comes to Next.js

React Server Components are set to change how Next.js applications are built, letting developers mix server-rendered and client-interactive code in the same route. The feature is part of the changes outlined in the Layouts RFC for the upcoming major release, where the app directory will become the default rendering environment.

For years, client-side React apps forced a trade-off between SEO and performance. Server Components shift the balance by keeping heavy work and large dependencies off the client entirely. When a component doesn't need interactivity, its code never ships to the browser. The result is a smaller JavaScript payload, faster time to interactive, and better Core Web Vitals without changing the developer experience of writing React.

What Makes Server Components Different from SSR

Server-side Rendering (SSR) is a well-known technique: the server renders your application to HTML before it reaches the user. This offloads work from the user's device, which helps on slower connections or older hardware. But it only goes so far. Even with SSR, the user still has to download, parse, and hydrate those components after the initial HTML arrives.

React Server Components take this further. Instead of the all-or-nothing approach of traditional SSR, where the entire page must be rendered and hydrated, Server Components allow data fetching to be incremental. Updates can stream to the client progressively as data becomes available, rather than waiting for a single complete render cycle.

How the Next.js Implementation Will Work

The changes aren't live yet, but the Layouts RFC from Vercel lays out the direction. In the app directory, Pages and Layouts will be rendered as React Server Components by default. That default choice alone reduces client-side JavaScript because components that don't need interactivity never make it to the browser.

For components that do require interactivity, developers will have two ways to mark them as client components: by using a specific file name extension or by adding a string literal within the file. Both client and server components can coexist in the same route, so you don't have to choose one rendering model per page.

Both client and server components can be used together in the same route.

The ability to combine these rendering modes means the routing structure itself can align with the performance characteristics of each part of your UI. More details on the official timeline for React Server Components are expected in the coming months.