-
Book Overview & Buying
-
Table Of Contents
React Application Architecture for Production - Second Edition
By :
React Server Components (RSC) are a relatively new model that changes where React components run. Traditionally, all React components run in the browser. With RSC, some components run only on the server; they can fetch data, access databases directly, and never send their JavaScript to the client.
The main appeal is performance. When a component runs on the server, the browser doesn't need to download its JavaScript bundle, wait for it to execute, and then fetch data. The server does the work and sends back finished HTML. This is especially valuable for content-heavy pages or parts of the UI that don't need interactivity.
The mental model takes some getting used to because there is a clear boundary between server components (data fetching, no hooks, no browser APIs) and client components (interactive, can use state and effects). Getting that boundary wrong produces confusing errors.
If you're building an application where initial...