What is the React Server Component payload (RSC payload)?

The RSC payload is the compact, streamed data format React produces when rendering Server Components. It contains the rendered output of Server Components, references to Client Component modules with their props, and placeholders for content still suspended. Next.js uses it to build HTML on first load and to update the UI on client navigations.

What it contains

  • The rendered tree of Server Components (elements and text), not their code.
  • For each Client Component: a reference to its JavaScript chunk and its serialized props.
  • Promises and Suspense boundaries that resolve later in the stream.
  • Server Function references, as encrypted IDs.

How Next.js uses it

  1. Initial load: the server renders the payload and HTML together. The payload is inlined in the HTML (in script tags) so React can hydrate Client Components without refetching.
  2. Client navigation: the router fetches only the payload for changed segments (RSC: 1 requests, ?_rsc= query) and merges it into the live tree, keeping layouts and state.
  3. Prefetching: <Link> prefetches payloads, App Shells or segments into the client cache.
  4. Server Functions: responses carry the updated payload along with the return value.
  5. Caching: "use cache" serializes outputs into this format, which can be stored in prerendered HTML, a server store or the browser.

Performance notes

  • Large props to Client Components inflate it (sent once as HTML and again in the payload).
  • Next.js 16.2 made payload deserialization up to 350% faster via a React change.

Interview tip

Explain it as "JSON-like instructions for building the UI tree", distinct from HTML. HTML is for the first paint; the payload is for React.

Code example

tsx
1// app/page.tsx
2import { LikeButton } from "./like-button"; // "use client"
3
4export default async function Page() {
5 const post = { id: "42", title: "RSC payload explained", likes: 7 };
6 return (
7 <article>
8 <h1>{post.title}</h1>
9 <LikeButton postId={post.id} initial={post.likes} />
10 </article>
11 );
12}
13
14// Simplified idea of the payload streamed for this page:
15// 1:I["app/like-button.js", ["chunk-abc.js"], "LikeButton"] <- client module reference
16// 0:["$","article",null,{"children":[
17// ["$","h1",null,{"children":"RSC payload explained"}],
18// ["$","$L1",null,{"postId":"42","initial":7}] <- client component + props
19// ]}]
20// Inspect real payloads: DevTools Network tab, filter by "_rsc" or the RSC request header.

Practice this question

Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the Next.js set.

Open in study app