What are React Server Components? RSC explained
React Server Components render on the server, before bundling, and ship no JavaScript to the browser. How they work, the 'use client' boundary, and the risks.

React Server Components (RSC) are React components that run ahead of time on a server, or once at build time, and send only their rendered output to the browser, never their code. They can be async, read a database or the filesystem directly, and import heavy libraries without adding a byte to the client bundle. Interactive pieces are ordinary Client Components, marked with 'use client', that the server output wraps around.
The React docs put it this way: Server Components are “a new type of Component that renders ahead of time, before bundling, in an environment separate from your client app or SSR server” (react.dev). That separate environment is the “server” in the name. It can be a request handler or a CI job.
Where did React Server Components come from?
The React team first showed them on December 21, 2020, in a post titled “Introducing Zero-Bundle-Size React Server Components”. It was explicitly research: “React Server Components are still in research and development.” The first framework to bet on them for production was Next.js, whose 13.4 release on May 4, 2023 marked the App Router stable, built on Server Components and Suspense, with every component a Server Component by default.
React 19 went stable on December 5, 2024 and included “all of the React Server Components features included from the Canary channel.” It carries one caveat builders tend to miss: Server Components are stable for application code, but “the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.” In practice that means you get RSC through a framework, and the framework pins React.
How do React Server Components work?
Think of a React tree with two kinds of node. Server nodes run once, on the server, produce output and disappear. Client nodes get shipped as JavaScript, hydrate and keep state. The bundler decides which is which from the module graph, not from where a component appears on screen.
Here is a Server Component from the docs. It runs at build time, reads a Markdown file and renders it.
import marked from 'marked'; // Not included in bundle
import sanitizeHtml from 'sanitize-html'; // Not included in bundle
async function Page({page}) {
// NOTE: loads *during* render, when the app is built.
const content = await file.readFile(`${page}.md`);
return <div>{sanitizeHtml(marked(content))}</div>;
}
The browser never sees Page, marked or sanitize-html; per the docs, “the client will only see the rendered output.” That is the whole “zero-bundle-size” pitch. A Markdown parser, a date library, a syntax highlighter: if they only run inside Server Components, they cost the user nothing to download.
Two more properties follow from running on the server:
- Components can be
async. “When youawaitin an async component, React will suspend and wait for the promise to resolve before resuming rendering,” and that works with streaming through Suspense. You can even create a promise on the server and hand it to a Client Component, which reads it withuse. - Data access without an API layer. Server Components “can also run on a web server during a request for a page, letting you access your data layer without having to build an API.” The component is the endpoint.
What does ‘use client’ actually do?
'use client' goes at the top of a file and marks “the module and its transitive dependencies as client code” (react.dev). When a Server Component imports that file, a compatible bundler treats the import as a boundary and builds a separate client bundle for everything below it.
// Expandable.jsx
"use client"
import { useState } from 'react';
export default function Expandable({children}) {
const [expanded, setExpanded] = useState(false);
return (
<div>
<button onClick={() => setExpanded(!expanded)}>Toggle</button>
{expanded && children}
</div>
);
}
// Notes.jsx: a Server Component. No directive needed.
import Expandable from './Expandable';
async function Notes() {
const notes = await db.notes.getAll();
return notes.map(note => (
<Expandable key={note.id}><p>{note.text}</p></Expandable>
));
}
The pattern to notice: the server passes already-rendered JSX as children into a client component. Expandable owns the toggle state; the note text was rendered on the server and arrives as output.
Three rules trip people up, all from the docs:
- There is no directive for Server Components. “A common misunderstanding is that Server Components are denoted by
"use server", but there is no directive for Server Components. The"use server"directive is used for Server Functions.” In a framework like the Next.js App Router, unmarked components are Server Components by default. - The boundary lives in the module graph, not the render tree. Once a file is client, everything it imports is client too. Put
'use client'on a layout and you have quietly moved the whole subtree into the bundle. - Props across the boundary must be serializable. Primitives, plain objects, arrays,
Map,Set,Date, typed arrays, promises, JSX and Server Functions are fine. Ordinary functions, class instances and unregistered symbols are not. An inlineonClickhandler defined in a Server Component cannot be passed down.
React Server Components vs server-side rendering: what’s the difference?
This is the most common confusion, and the docs define RSC as separate from “your client app or SSR server” for a reason.
SSR takes your whole component tree, renders it to HTML on the server for a fast first paint, then ships all of that component code to the browser and hydrates it. Every component exists twice: once as HTML, once as JavaScript.
RSC splits the tree. Server Components run on the server and never ship. Only Client Components ship and hydrate. A framework usually does both: it runs Server Components, then SSRs the resulting tree including Client Components into HTML for the first load, and on later navigations fetches fresh Server Component output without a full page reload.
So RSC is a different axis from SSR. SSR is about when HTML first appears. RSC is about which code ever reaches the browser.
Why do React Server Components matter to a builder?
From the front-end lead seat I had on a large e-commerce site, the cost I’d watch on a product page was JavaScript, not HTML. Product pages are mostly content: descriptions, specs, reviews, images, prices. Only a few islands are interactive: the size picker, the add-to-cart button, the image zoom. Before RSC, React made you ship code for the content too, because it was all one tree.
RSC lets the content stay on the server and the islands go to the client, while you keep one component model and one language. That is the same instinct behind htmx and Astro islands (this blog is built on Astro). The difference is that RSC keeps React on both sides, so a team with a React design system does not rewrite it.
The second gain is data fetching. Colocating await db.query() inside the component that renders the result removes a REST or GraphQL layer that only existed to feed one page. Whether that is good depends on whether other clients need the same API. A mobile app still does.
Where do React Server Components break?
The server is now an attack surface, and the wire format is a parser. On December 3, 2025 the React team disclosed CVE-2025-55182, rated CVSS 10.0: “an unauthenticated remote code execution vulnerability in React Server Components.” It sat in how React decodes payloads sent to Server Function endpoints, in react-server-dom-webpack, -parcel and -turbopack versions 19.0, 19.1.0, 19.1.1 and 19.2.0, fixed in 19.0.1, 19.1.2 and 19.2.1. The line I’d circle: “Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.” Deserializing attacker input on a server is the same class of mistake as Log4Shell, and the fix path is the same: know which versions you run, which is what an SBOM is for.
Server Functions are public endpoints. A function marked 'use server' and passed to a client becomes something the browser can call with any arguments. Validate input and check authorization inside it, exactly as you would in an API route.
Leaking server data into the client. Anything you pass as a prop to a Client Component is serialized into the page. Passing a whole user record because the component needs the name sends the rest too.
Mental model cost. Two environments in one file tree means bugs like “this component imports a hook but has no directive” or “a client file imports a server-only module”. The errors are clear once you know the rules and opaque before.
Framework lock-in. Since the bundler APIs do not follow semver, RSC in practice means Next.js, or a smaller set of frameworks that track React closely. Moving off one is a migration, not a config change.
What I would do
For a content-heavy site with a few interactive parts (marketing, docs, commerce product pages), I would use Server Components by default and push 'use client' as far down the tree as it will go: the button, not the card; the card, not the page. Pass rendered JSX as children into client wrappers instead of moving the wrapper’s parent to the client.
For a dashboard where nearly every widget is interactive and state-heavy, I would not contort the app to use RSC. A client-rendered React app behind a clean API is simpler and the bundle savings are small.
On security, I would treat every Server Function like a REST handler (validate, authorize, rate-limit), subscribe to the React and framework security feeds, and keep React patch upgrades on a short clock. December 2025 showed that “it’s just components” is not a security model.
FAQ
Are React Server Components the same as SSR?
No. SSR renders the whole tree to HTML and then ships and hydrates all of it in the browser. Server Components never ship their code at all; only Client Components do. Most frameworks combine the two.
Do I need Next.js to use React Server Components?
You need a framework or bundler integration that supports them, because the bundler has to split the module graph at 'use client'. The React 19 post says those bundler APIs can change between minor versions, so most teams use Next.js or another framework that pins React for them.
Can Server Components use useState or useEffect?
No. “Server Components are not sent to the browser, so they cannot use interactive APIs like useState.” Move the stateful part into a small Client Component and render it from the Server Component.
Is ‘use server’ how you mark a Server Component?
No. There is no directive for Server Components. 'use server' marks Server Functions, which the client can call over the network.
Are React Server Components safe?
They are as safe as the server code behind them and the React version you run. CVE-2025-55182 (CVSS 10.0, December 2025) allowed unauthenticated remote code execution in affected versions, so patch promptly and validate every Server Function’s input.
Sources
- React docs, Server Components and
'use client', accessed October 31, 2026 - React team, Introducing Zero-Bundle-Size React Server Components, December 21, 2020
- Next.js, Next.js 13.4, May 4, 2023
- React team, React v19, December 5, 2024
- React team, Critical Security Vulnerability in React Server Components, December 3, 2025 (updated January 26, 2026)