ReactOct 28, 2024•6 min read
Understanding React Server Components
📝
React Server Components (RSC) allow you to render components on the server, reducing the amount of JavaScript sent to the client.
Benefits of RSC
- Zero Bundle Size: Server components are not included in the client bundle.
- Direct Backend Access: You can access your database or file system directly from your components.
- Automatic Code Splitting: Client components imported by server components are automatically code-split.
When to use Client Components?
Use Client Components when you need interactivity, such as event listeners (onClick, onChange), hooks (useState, useEffect), or browser-only APIs.
PS
Prajwol Sapkota
Frontend Web Developer