Next.js
React Server Components
RSC render on the server and send a serialized tree to the client, minimizing client JS.
Core idea
- Components run on the server, not the browser.
- Output is a serialized tree merged with Client Components.
- No DOM, state, effect hooks, or browser APIs.
Why App Router depends on RSC
- Move data fetching and heavy logic to the server.
- Smaller client bundle, less hydration.
- Enables streaming and partial rendering via Suspense.
- Supports Server Actions without HTTP endpoints.
What RSC enable
- Secure access to DB and secrets.
- Caching at fetch and route levels.
- Fast UI delivery with HTML + RSC payload.
When Client Components are needed
- Interactivity, state, effects, DOM APIs, client-only libraries.