Question presented to candidate: "Explain React Server Components to me as if I only know classic SSR. What is actually sent to the browser, and why did Next.js make them the default?"
What a strong answer should cover:
- A Server Component runs only on the server; its code and its dependencies are never sent to the browser.
- The server sends the RSC payload: a serialized description of the rendered tree, with references to Client Component code where needed.
- This is different from classic SSR, where the same component code also ships and runs again in the browser.
- Benefits: smaller bundles, direct access to databases and secrets, data fetching close to the source, and streaming.
- Limits: no state, effects or event handlers; interactivity lives in Client Components.
Clarifying questions expected:
- "Is SSR the same thing?" β no; SSR produces HTML, RSC produces a payload, and Next.js uses both.
- "Which parts need interactivity?" β those become Client Components; everything else can stay on the server.
Code / implementation expected: Yes β a server component that reads data, and what arrives in the browser.