React Server Components vs SSR: what is the difference
AdvancedReact interview questionBy UIRound, updated 3 December 2026
Short answer
They solve different problems, and frameworks use both together. SSR (server-side rendering) turns the component tree into HTML on the server so the first paint is fast, but every component's code still ships to the browser and hydrates. React Server Components run ahead of time, at build time or per request, and send only their rendered result; their code and imports never reach the bundle. SSR is about the first HTML. Server Components are about what code ships.
What SSR does
SSR is a rendering step. The react-dom/server APIs, such as renderToPipeableStream and renderToReadableStream, render a React tree to HTML on the server to produce the initial page. The browser shows that HTML at once, then downloads the JavaScript for the same components and hydrates: React attaches event handlers to the existing DOM and the page becomes interactive.
SSR has existed since the first React versions. Its costs are well known: every component on the page is in the bundle even if it never changes, and the browser has to run all of it again to hydrate.
What Server Components do
Server Components are a kind of component, not a rendering step. The React docs define them as components that render ahead of time, before bundling, in an environment separate from your client app or SSR server. That environment is the "server" in the name, and it does not have to be a web server: Server Components can run once at build time on CI or for each request.
import { marked } from "marked"; // not included in the bundle
import { readFile } from "node:fs/promises";
export default async function Post({ slug }) {
const md = await readFile(`posts/${slug}.md`, "utf8");
// Trusted files from the repo; sanitize anything users can write
return <article dangerouslySetInnerHTML={{ __html: marked.parse(md) }} />;
}This component can be async, read files or a database directly, and import a heavy library, because none of it is sent to the browser. Only the output is. The trade-off is that it cannot use state, effects or event handlers. For those you compose it with a Client Component, a module marked 'use client'.
Side by side
| SSR | Server Components | |
|---|---|---|
| What it is | A way to render any component to HTML | A type of component |
| Output | HTML | A serialized tree (in Next.js, the RSC Payload) |
| Component code in the bundle | Yes, all of it | No, only Client Components ship |
| Hydrated in the browser | Yes | No, there is nothing to hydrate |
| Can use state and effects | Yes, after hydration | No |
Can await data in render |
Not in the classic model | Yes, async components |
| Runs on later client navigations | No, only on the first request | Yes, the server sends a new payload |
| Works without the other | Yes, classic SSR apps | Yes in principle; SSR is optional |
The React docs say this plainly in their examples: the output of Server Components "can then be server-side rendered (SSR) to HTML", and "optionally, that bundle can then be server-side rendered". SSR is an optional step after Server Components, not the same thing.
How Next.js combines them
The Next.js App Router does both on the first request:
- Server Components render into the RSC Payload: their output, placeholders for Client Components with references to their JavaScript, and the props passed to them.
- Client Components and the RSC Payload are used to prerender HTML. This is SSR.
- In the browser, the HTML shows a fast non-interactive preview, the RSC Payload reconciles the server and client trees, and JavaScript hydrates only the Client Components.
On later navigations there is no HTML step. The RSC Payload is fetched (often prefetched), and Client Components render entirely in the browser. That is the clearest sign the two are separate: Server Components keep working on every navigation, SSR only helps the first load.
Client Components are server-rendered too
A common misunderstanding is that 'use client' means "render only in the browser". In Next.js, Client Components are still prerendered to HTML on the first request, as step 2 shows. 'use client' marks a module and everything it imports as client code, meaning its code ships and it hydrates. It does not turn SSR off. To skip server rendering for one component, such as a chart that touches window on import, Next.js uses dynamic(() => import(...), { ssr: false }) from a Client Component.
The other misunderstanding goes the opposite way: 'use server' does not mark a Server Component. Server Components need no directive; in the App Router every component is one by default. 'use server' marks Server Functions, which the client calls over the network.
The boundary rules are in Server Components vs Client Components in Next.js, and hydration itself in What is hydration in React?. For the deeper version, read the React Server Components guide and Suspense and streaming SSR.
Why have both
Each fixes the other's weak spot:
- SSR without Server Components gives fast first HTML but a large bundle and a long hydration on content-heavy pages.
- Server Components without SSR ship less code, but the first visit would wait for JavaScript before anything appears.
- Together, the user sees HTML immediately, the browser only downloads and hydrates the interactive parts, and later navigations fetch rendered server output instead of JSON plus client rendering.
Practise picking the boundary in Decide the server/client component boundary for a Next.js product page, spotting broken boundaries in Check React Server Component boundaries, and building the wire format in Stream a Server Components-style payload.
Common follow-up questions
Do Server Components replace SSR?
No. They replace part of what the client bundle used to do. Next.js still uses SSR for the first HTML of every route that has Client Components.
Is getServerSideProps SSR or Server Components?
SSR. In the Pages Router, getServerSideProps fetches data per request, the page renders to HTML, and the whole page's code ships and hydrates. The App Router replaces it with async Server Components. See getServerSideProps vs getStaticProps.
Do Server Components remove hydration?
Only for themselves. Client Components inside the tree still hydrate. Pages that are mostly static content hydrate much less.
Are Server Components stable?
The React 19 docs say Server Components are stable and will not break between minor versions, but the lower-level APIs that bundlers and frameworks use to implement them do not follow semver yet. In practice you use them through a framework such as Next.js.
Can a Server Component pass anything to a Client Component?
Only serializable props, such as plain objects, arrays, strings, numbers, JSX and Server Functions. A plain function or a class instance throws.
Mistakes to avoid
Saying "Server Components are SSR"; they produce a serialized tree, not HTML
Assuming
'use client'disables server renderingMarking Server Components with
'use server'Moving a whole page to a Client Component for one button, which ships the whole page's code again
Passing non-serializable values, such as callbacks, from a Server Component to a Client Component
Sources
Practise it in code
Interviewers rarely stop at the definition. These questions open in an editor with tests.
- Decide the server/client component boundary for a Next.js product pageHard45 min
- Check React Server Component boundaries: missing
'use client', server-only imports in client code and non-serialisable propsHard50 min - Stream a Server Components-style payload:
$Lplaceholders, client references and out-of-order rowsHard60 min - Build a Suspense-based data-loading example with streaming SSR boundariesHard75 min
- Implement SSR hydration mismatch detection and a reproduction/fix exerciseHard60 min
- Fix request data leaking between concurrent SSR renders with a per-request contextHard40 min
- Choose a rendering strategy per route for a marketplaceHard50 min