Streaming responses from the server

Without streaming, the server has to wait until every bit of data is ready before it can send a single byte. With streaming, it sends the HTML as soon as each piece is ready, and the browser paints progressively. Suspense is what tells React which parts can stream and which parts have to wait.

Streaming vs blocking

Without Suspense, the whole page waits for the slowest piece. With Suspense, the fast parts arrive first.

Streaming directly improves time to first byte. The server can send the header, the nav, and any skeletons immediately, even if the main content is still loading. For pages that mix fast data (the user profile) with slow data (a complex query), this feels like a completely different app.

Quiz: Quiz

Loading practice…