Course contentsShow
← React
Lesson 1559 of 2,39638. Server Components FundamentalsFree lesson

Zero JavaScript for Static Content

How RSCs render on the server and send only the output, never shipping component code for non-interactive parts.

Zero JavaScript for Static Content

What you'll learn: How React Server Components render on the server and send only the output, never shipping component code for non-interactive parts.

The Core Idea

When a Server Component renders, React executes it on the server, generates the output, and sends that result to the browser. Crucially, the component code itself never makes it to the client bundle. If a component has no interactivity—no onClick, no useState, no dynamic behavior—the browser receives only the rendered content, with zero JavaScript overhead.

This is fundamentally different from traditional React, where every component, even purely presentational ones, ships as JavaScript that must be parsed, executed, and rendered in the browser.

Think of It Like a Restaurant Menu

Imagine a restaurant menu with static descriptions and an interactive ordering button:

  • Server Component (the descriptions): The chef writes the menu once. You receive a printed copy. There's no "menu-writing code" in your hands—just the final text.
  • Client Component (the button): The ordering mechanism needs JavaScript because it responds to your clicks.

Server Components are the menu descriptions—they render once on the server, you get the output, and that's it. No component logic ships to your browser.

The Performance Win

A typical blog post component with thousands of words might be 50+ lines of JSX. In a traditional SPA, that entire component ships as JavaScript. With Server Components, the browser receives the rendered HTML-like output—often smaller—and zero bytes of component code.

Multiply this across dozens of static components (headers, footers, article content, navigation) and the bundle size difference becomes dramatic.

Key Takeaway: Server Components render to output on the server; the browser never downloads their code, achieving true zero-JavaScript delivery for non-interactive content.