A simplified guide to the shift in React's architecture and how Server Components improve performance and security.
React Server Components are a paradigm shift. They allow us to build rich, interactive apps with significantly less client-side JavaScript.
### How it works
Server Components execute on the server and send a pre-rendered result to the client. Only components that need user interaction (like forms or toggles) are marked with `'use client'` and send JavaScript to the browser.
### Benefits of RSC
- **Zero Bundle Size**: Data-fetching logic and heavy libraries (like Markdown parsers) stay on the server.
- **Direct Database Access**: You can query your database directly inside a component without an intermediate API layer.
- **Automatic Code Splitting**: It naturally organizes your code into smaller, more efficient chunks.