Streaming Server Rendering (SSR) is a major React 18 improvement that makes server-side rendering faster and more efficient. Instead of waiting for the entire HTML page to be generated before sending it to the browser, React 18 streams content as it’s ready — improving First Paint and perceived performance.
Think of it as Netflix-style rendering — components start appearing as soon as possible, even while others are still loading.
This reduces Time to First Byte (TTFB) and improves Core Web Vitals.
Click buttons to feel the difference in loading strategies.
// server.js conceptual example using React 18 streaming SSR
import express from "express";
import { renderToPipeableStream } from "react-dom/server";
import App from "./App";
const app = express();
app.get("/", (req, res) => {
res.setHeader("Content-Type", "text/html");
const { pipe } = renderToPipeableStream(, {
onShellReady() {
// Start streaming HTML as soon as shell is ready
pipe(res);
},
onAllReady() {
// Called after entire component tree is rendered
console.log("All components rendered");
},
onError(err) {
// Handle rendering errors
console.error(err);
}
});
});
app.listen(3000);
renderToPipeableStream() allows HTML to stream immediately without waiting for heavy data dependencies.
This diagram represents how UI chunks stream sequentially to the browser.
Suspense for data loading.Goal: Understand how Streaming SSR delivers progressive HTML and improves perceived performance.