How React Server Components really work and how to design with them: the RSC payload, the server/client boundary, data fetching without waterfalls, streaming with Suspense, caching, server actions and their security, patterns that scale, and when RSC is the wrong tool.
Before Server Components, a typical React app had three problems that no amount of tuning fully solved.
1. Every component ships to the browser. A product page that renders markdown pulls a markdown parser into the bundle. A date-heavy page ships a date library. Code that runs once to produce static output is downloaded, parsed, and executed by every visitor, on every device, including slow phones.
2. Data fetching happens in the wrong place. The classic pattern is: render, run useEffect, call an API route, which calls the database, then render again. That's at least one extra round trip from the browser, often several, because a child can't start fetching until its parent has fetched and rendered it (a client-side waterfall).
3. Server rendering doesn't fix either one. SSR produces HTML for a fast first paint, but the browser still downloads the JS for every component and hydrates all of it. SSR moves the first render to the server; it doesn't remove any code from the client.
React Server Components (RSC) attack all three at once by letting some components run only on the server:
async and read data directly (a database, a file, an internal service), right next to the markup that uses it.RSC is a React feature, not a Next.js feature, but it needs a framework that understands bundling for two environments. Next.js's App Router is the most widely used implementation; React Router and others have their own. Examples here use Next.js conventions where a framework is needed.
What you'll be able to do after this tutorial: explain the RSC payload, place the server/client boundary deliberately, fetch data without waterfalls, design Suspense boundaries, reason about caching, write server actions that are safe, and decide when RSC is the wrong tool.