React Server Components (RSC)
React components that run only on the server, send rendered output instead of JavaScript, and can read data directly.
A server component can query a database or call an API inside the component, and its code never reaches the browser. Only parts marked as client components ship JavaScript and hydrate. In Next.js the App Router is built on them. The win is smaller bundles and fewer round trips; the cost is a new mental model of what runs where.
Related terms
- Hydration: The step where JavaScript in the browser attaches to server-rendered HTML and makes it interactive.
- SSR, SSG and ISR: Three ways to render pages: on every request (SSR), once at build time (SSG), or at build time and refreshed later (ISR).
- Request waterfall: Requests that wait for each other in sequence when they could run in parallel, so load time adds up.
