streaming-ssr

Stream React 18+ SSR HTML chunks using renderToPipeableStream.

235|25|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/PatternsDev/skills --skill streaming-ssr-patternsdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-ssr
Source: https://github.com/PatternsDev/skills/tree/main/react/streaming-ssr
Command: npx skills add https://github.com/PatternsDev/skills --skill streaming-ssr-patternsdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streaming SSR reduces Time To First Byte (TTFB) and First Contentful Paint (FCP) by delivering HTML in chunks as it's generated on the server, enabling the client to start rendering sooner.

Core Features & Use Cases

  • Use renderToPipeableStream (React 18+) to stream the shell first, followed by slower content.
  • Combine streaming with Suspense boundaries to progressively stream content as data loads.
  • Use onShellReady to start streaming when the shell is ready.
  • Handle streaming errors with the onError callback to maintain resilience during streaming.

Quick Start

Set up a React 18+ server and implement renderToPipeableStream with onShellReady to begin streaming the shell immediately.

Frequently Asked Questions about streaming-ssr

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

FAQPage Schema
How does streaming server-side rendering improve TTFB and FCP in React 18?

Streaming server-side rendering improves TTFB and FCP by delivering HTML in chunks as it's generated on the server, enabling the client to start rendering sooner rather than waiting for the entire page to be ready.

How do I use Suspense boundaries to progressively stream content during SSR?

Combine streaming with Suspense boundaries to progressively stream slower content as data loads, sending the page shell first and injecting suspended chunks into the response stream once their data resolves.

What's the best way to start streaming the shell using renderToPipeableStream?

Use renderToPipeableStream and trigger the onShellReady callback to start streaming the shell immediately, ensuring the client receives the initial HTML structure while slower content continues loading on the server.

Does streaming SSR require special error handling for React server-rendered apps?

Yes, streaming SSR requires proper error handling using the onError callback to maintain resilience during streaming, ensuring the shell delivery succeeds even if later streamed content encounters loading failures.

Can I use streaming SSR for large pages and dynamic content with React 18+?

Streaming SSR applies to React 18+ server-rendered apps to improve TTFB and FCP for large pages and dynamic content, requiring renderToPipeableStream or renderToReadableStream and proper progressive hydration setup.

When do I need progressive hydration with streaming server-side rendering?

Progressive hydration is needed when combining streaming SSR with Suspense, allowing the client to hydrate the shell and progressively hydrate slower content chunks as they arrive, maintaining a responsive UI.