AceDevHub
Advanced React Interview QuestionsAdvancedComparison

React · Question 89

What is the difference between React Server Components and traditional server-side rendering?

Direct answer

SSR generates initial HTML for components that may later hydrate on the client, while Server Components execute outside the client bundle and send rendered component output that does not itself become interactive client component code.

ConcernServer-Side RenderingServer Components
Main goalGenerate initial HTMLKeep selected component logic and dependencies off the client
Client JavaScriptRendered components may still hydrateServer Component implementation is not shipped as client component code
Data accessServer rendering can fetch dataServer Components can directly access server-side data during their render
InteractivityHydrated components can be interactiveInteractivity is composed using Client Components

The two technologies can be combined. A framework can render a Server Component tree and also use SSR to produce initial HTML for the overall page.