Server Components by default
In the App Router, every component is a Server Component unless you say otherwise. Server Components render on the server — ahead of time, or on each request — so they never ship their code to the browser.
That changes what they can do. A Server Component can be async and await
data directly, read from a database, and use secrets, because none of it leaves
the server:
// app/posts/page.tsx
export default async function Page() {
const posts = await getPosts();
return <PostList posts={posts} />;
}
A Server Component cannot use state, effects, event handlers, or browser APIs — those need the client.
When Next.js renders a route it produces two things: HTML for a fast, non-interactive first paint, and the RSC Payload — a compact description of the rendered tree. The payload holds the output of the Server Components plus placeholders for any Client Components and the props they receive. React uses both to reconcile the tree on the client. On a client-side navigation, Next.js sends only the RSC Payload, not a new HTML document.
Because Server Component code stays on the server, it does not add to the JavaScript bundle the browser downloads. That is the performance story: fetch close to the data, keep secrets server-side, and ship less code.
You are about to answer a short quiz on RSC and the RSC Payload.