React Server Components (RSC) are React components that execute only on the server and send a serialized description of their output to the browser instead of their JavaScript code. In modern web applications, they let a single component tree mix server-only logic, such as database queries and secret-bearing API calls, with interactive client components, while reducing the JavaScript bundle that users must download.
The model was introduced by the React team as a research proposal in 2020 and became stable with React 19, with Next.js App Router as its most widely used implementation. RSC is not a replacement for server-side rendering (SSR); it is a new component type that works alongside SSR, hydration and client-side rendering.
How React Server Components render and stream
React Server Components render in a server environment that has access to files, databases and internal services, and the result travels to the client as the RSC payload, a compact streaming format sometimes called the Flight protocol. The payload describes the rendered element tree, the props passed to client components and references to client modules, not the server code itself.
On the client, React reads the payload and reconciles it into the existing tree. Because the format streams, the server can send finished parts of the page first and fill Suspense boundaries later as slower data arrives. A navigation can request a new payload and merge it without losing client state such as form input or scroll position.
The following table lists the main stages of a request in a typical RSC framework.
| Stage | Where it runs | What happens |
|---|---|---|
| Server component render | Server | Fetches data and produces the RSC payload |
| SSR of the payload | Server | Optionally turns the payload into initial HTML |
| Streaming | Network | HTML and payload chunks arrive progressively |
| Hydration | Browser | Only client components become interactive |
| Client navigation | Browser and server | New payload is fetched and merged into the tree |
Server components, client components and the use client boundary
In an RSC application every component is a server component by default, and a file that begins with the "use client" directive marks a client boundary. Everything imported below that boundary is bundled for the browser and can use state, effects and event handlers. Server components can render client components and pass them serializable props, but client components cannot import server components directly; they can only receive them as children or other props.
The table below compares the two component types on the capabilities that matter most in design decisions.
| Capability | Server component | Client component |
|---|---|---|
Async rendering with await | Yes | No, uses hooks or libraries instead |
| Direct database or file access | Yes | No |
useState and useEffect | No | Yes |
Event handlers such as onClick | No | Yes |
| Code sent to the browser | None | Full component code |
| Access to secrets and tokens | Safe on the server | Never safe |
Server Actions, also called server functions and marked with "use server", complete the model in the other direction. They let a client component call a server function by reference, which React transmits as an RPC-style request; this replaces many hand-written API endpoints for form submissions and mutations.
How RSC differs from SSR, SSG and client-side rendering
React Server Components are often confused with server-side rendering, but the two solve different problems. SSR produces HTML for the first paint and then ships and hydrates the whole component tree, while RSC decides which components ever reach the browser at all. Most frameworks combine them: server components render the payload, and SSR converts that payload to HTML for the initial request.
The table summarizes how RSC relates to neighboring rendering strategies in the same Topic.
| Approach | Output | JavaScript shipped | Typical strength |
|---|---|---|---|
| Client-side rendering | Empty shell, then DOM in browser | Whole application | Rich interactivity after load |
| SSR with hydration | HTML per request | Whole component tree | Fast first paint, dynamic data |
| SSG | HTML at build time | Whole component tree | Cheap hosting, cacheable pages |
| Islands architecture | Static HTML with isolated widgets | Only island code | Content sites with small interactive parts |
| React Server Components | RSC payload, often plus HTML | Only client components | Data-heavy apps with selective interactivity |
RSC resembles islands architecture in that static parts carry no client code, but it keeps one React tree and supports client-side routing with preserved state, which island frameworks such as Astro handle differently.
When to choose server components
The practical rule is to keep components on the server unless they need interactivity or browser-only APIs. Moving the client boundary as deep into the tree as possible, often to a single button or input, gives the largest bundle savings.
| Situation | Recommended type | Reason |
|---|---|---|
| Product list loaded from a database | Server component | Data access without an API round trip |
| Markdown rendering with a large parser | Server component | Parser library never reaches the browser |
| Search box with live filtering | Client component | Needs state and keyboard events |
| Layout with a theme toggle | Server layout, client toggle | Keeps the boundary small |
Chart using canvas or window | Client component | Depends on browser APIs |
Limitations and common mistakes with RSC
React Server Components add architectural complexity: developers must reason about two module graphs, serialization rules and framework-specific caching. RSC also requires a bundler and framework integration, so it cannot simply be dropped into an existing single-page application built with a basic setup.
- Passing non-serializable props, such as functions or class instances, from a server component to a client component causes errors; only plain data, JSX and Server Action references can cross the boundary.
- Placing `”use client”` too high in the tree pulls large subtrees into the bundle and removes most of the benefit.
- Leaking secrets happens when server-only modules are imported by client files; the
server-onlypackage and environment variable conventions help prevent this. - Request waterfalls appear when nested server components await data sequentially; parallel fetching and Suspense boundaries reduce the latency.
- Treating Server Actions as private is a security error, because every action is a publicly callable endpoint that needs authentication and input validation.
Put simply
Most websites built with React send the browser a large package of code so the browser can build the page itself. React Server Components change this. Parts of the page that only show information are built on the server, and the browser receives the finished result, much like receiving a printed menu instead of the recipe for printing it.
Only the parts that react to clicks and typing, such as buttons and forms, send their code to the browser. The key takeaway is that pages load less code and can still feel interactive, because each piece runs where it makes the most sense.
In practice
An online bookstore rebuilds its catalog pages with Next.js App Router. The book detail page previously shipped a Markdown parser, a date library and data-fetching code to every visitor, and the page needed a separate API request after loading before reviews appeared.
After the migration, the page, the description renderer and the review list are server components that query the database directly. Only the add-to-cart button and the rating widget are client components. The JavaScript downloaded for the page drops substantially, the reviews arrive in the first streamed response, and the add-to-cart flow uses a Server Action that checks the session and stock on the server. The result is a faster first view on mobile devices with no loss of interactivity.