Question presented to candidate: "Server-side rendering already runs components on the server. So what do Server Components add?"
What a strong answer should cover:
- They are different axes, not competing options. SSR is about when the HTML is produced; RSC is about whether a component's code ever reaches the browser.
- SSR runs your components on the server to produce HTML, then ships the same components again in the bundle so they can hydrate. The code goes over the wire twice.
- RSC components run on the server and never enter the client bundle at all. They emit a serialised description of UI, not HTML, and not JavaScript.
- So RSC's headline win is bundle size — a markdown renderer, a date library, a database client can stay entirely on the server.
- Server Components can be
asyncand read data directly (a database, the filesystem) because there is no client render to restart. - They have no state, no effects, no event handlers, and no hooks that need them. Anything interactive is a Client Component, marked with
"use client". - The boundary is one-way for code but not for composition: a Server Component can render a Client Component and pass it props — including an unresolved promise the client reads with
use(). - They are normally used together: RSC decides what ships, SSR still produces the initial HTML for the client parts.
Clarifying questions expected:
- "Are we talking about bundle size or time-to-first-byte?" — RSC addresses the first, SSR the second.
- "Which framework?" — RSC needs a bundler-integrated runtime, not just React.
Code / implementation expected: No. Naming what crosses the boundary is the answer.