0
Challenge · 99React 19 Frontier

Server Components

React 19used in ~20% of apps

Most of a page never needs to run in the browser — a blog post, a product grid, a layout. Server Components let those parts render on the server and ship as plain HTML with zero JavaScript, so the browser only downloads code for the bits that are actually interactive.

Core idea. A React Server Component (RSC) runs only on the server, sends finished HTML to the browser, and ships ~0 KB of JS — so it can't use state, effects, event handlers, or browser APIs. When a piece needs interactivity you mark a file with "use client", which draws the boundary where client JavaScript begins.
Playground, this isn't a screenshot
component tree server client
<LikeButton />Server Component
Build error: useState / onClick are not allowed in a Server Component. Add "use client" to fix it.
Render HTML / read props
await data directly (db, fetch)
useState / useEffectclient only
onClick & event handlersclient only
window / localStorageclient only
JS shipped to browser0 KB
JavaScript shipped to the browser0 KB / 71 KB if all client

2 interactive component(s) are still Server Components— they would crash the build because Server Components can't use state or event handlers. Select one and add "use client".

↑ play a little first, then dig in