streaming-ssr

Stream React server-side rendering with renderToPipeableStream and Suspense.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/PMKhai/claude-config --skill streaming-ssr-pmkhai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-ssr
Source: https://github.com/PMKhai/claude-config/tree/main/skills/streaming-ssr
Command: npx skills add https://github.com/PMKhai/claude-config --skill streaming-ssr-pmkhai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streaming server-side rendering reduces Time To First Byte and enables faster perceptual performance by delivering HTML as it's generated.

Core Features & Use Cases

  • Use renderToPipeableStream to stream the shell first and hydrate later.
  • Combine streaming with Suspense to progressively render content and improve FCP.
  • Works on Node.js HTTP responses or Web Streams runtimes (edge environments).

Quick Start

Start streaming the HTML shell with renderToPipeableStream and hydrate on the client when the shell is ready.

Frequently Asked Questions about streaming-ssr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Time To First Byte for large React pages?

Streaming SSR reduces Time To First Byte by sending the HTML shell immediately while slower components render. Using React 18 renderToPipeableStream with Suspense boundaries progressively delivers content to the client.

How does streaming server-side rendering work with React 18?

Streaming server-side rendering works by piping HTML chunks to the client via renderToPipeableStream. The shell renders first, and Suspense boundaries allow deferred content to stream later, improving perceived performance.

Can I use renderToPipeableStream in edge environments?

renderToPipeableStream targets Node servers, but edge environments can use renderToReadableStream for Web Streams. Both methods enable streaming SSR and require client hydration via hydrateRoot.

Do I need Suspense boundaries to stream SSR?

Yes, Suspense boundaries are required to progressively render content. They allow the shell to stream immediately while slower parts render, improving First Contentful Paint and overall perceived performance.

What is the best way to hydrate a streamed React application?

Hydrate a streamed React application using hydrateRoot on the client once the shell is ready. This attaches event listeners to the progressively streamed HTML generated by renderToPipeableStream.