Course contentsShow
← React
Lesson 1630 of 2,39640. Server-Side RenderingFree lesson

What Server-Side Rendering Actually Means

Understanding SSR as rendering React components to HTML strings on the server before sending to the browser.

What Server-Side Rendering Actually Means

You'll learn the core definition of SSR: rendering React components to HTML strings on the server before the browser ever sees them.

The Core Concept

Server-Side Rendering (SSR) means your React components execute on the server, producing HTML markup that gets sent to the browser as a complete page. Instead of shipping an empty HTML shell with a JavaScript bundle that builds the page in the browser, the server does the rendering work first.

Think of it like a restaurant: Client-side rendering is ordering ingredients delivered to your home—you cook the meal yourself. SSR is ordering a fully prepared meal—it arrives ready to eat, though you might add garnish (interactivity) after.

What Actually Happens

When a request comes in:

  1. React components run on the server
  2. They produce HTML strings (not DOM nodes)
  3. The server sends complete, populated HTML
  4. The browser displays content immediately
  5. JavaScript hydrates the page later for interactivity

The user sees meaningful content before JavaScript downloads or executes. This contrasts with traditional SPAs where users stare at spinners while JavaScript builds the entire page.

Why "Rendering" Is the Key Word

The term "rendering" here means the same process React always does—taking your JSX and creating output. The difference is where: server vs browser. The component logic runs server-side, accessing backend resources directly, then converts to HTML for transmission.

SSR doesn't mean "no JavaScript"—it means HTML first, JavaScript later. The page works immediately, then becomes interactive.

Key Takeaway: Server-Side Rendering means React components execute on the server to produce HTML strings sent to the browser, enabling users to see content before JavaScript loads.