Suspense & Streaming Generator

Wrap async React/Next.js server components in nested Suspense with skeleton fallbacks.

Updated Oct 31, 2025
One-click install
npx skills add https://github.com/RomualdP/hoki --skill suspense-streaming-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Suspense & Streaming Generator
Source: https://github.com/RomualdP/hoki/tree/main/.claude/skills/suspense-streaming
Command: npx skills add https://github.com/RomualdP/hoki --skill suspense-streaming-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react, next.

What problem does it solves? This Skill addresses slow loading times and blank screens in web applications by implementing React Suspense and Next.js Streaming, providing immediate visual feedback and a smoother user experience during data fetching.

Core Features & Use Cases

  • Progressive Rendering: Displays fallback UI (skeletons) while asynchronous Server Components load, improving perceived performance.
  • Independent Streaming: Allows different sections of a page to load and stream independently, preventing a single slow component from blocking the entire page.
  • Skeleton Components: Guides on creating visually consistent skeleton loaders that match the final content structure.
  • Use Case: On a dashboard page with multiple data widgets (e.g., user stats, activity feed, team list), wrap each widget in <Suspense> to load them in parallel, showing a skeleton for each until its data is ready.

Quick Start

To add a loading state for an async Server Component, wrap it in <Suspense fallback={<MyComponentSkeleton />} /> where MyComponentSkeleton is a simple UI placeholder.

Frequently Asked Questions about Suspense & Streaming Generator

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

FAQPage Schema
How do I fix slow loading and blank screens in Next.js server components?

React Suspense with Next.js streaming solves slow loading by showing skeleton UI while async server components fetch data. Wrap each async component in `<Suspense fallback={<Skeleton />}>` to display immediate visual feedback and stream content progressively as it loads.

Can I load different page sections independently in Next.js?

Yes, independent streaming with Suspense allows multiple sections to load in parallel. Wrap each section—like dashboard widgets—in separate `<Suspense>` boundaries with its own skeleton fallback, so one slow component doesn't block the entire page.

What's the best way to create skeleton loaders for async components?

Build skeleton components that match your final content structure—gray placeholder boxes for text, images, and layouts. Pass these as fallback UI to Suspense boundaries around async server components to provide visual continuity during data fetching.

Why should I avoid a global loading.tsx in Next.js?

Global loading.tsx shows one fallback for the entire page, blocking user interaction until all data loads. Granular Suspense with per-section fallbacks enables progressive rendering, letting users see and interact with loaded content immediately while other sections stream in.

Does React Suspense work with nested async components?

Yes, React Suspense supports nested boundaries, allowing parent and child async components to have independent fallback UI and streaming. This enables fine-grained control over which sections load and display together.

How do I implement streaming for improved perceived performance in React?

Suspense with streaming progressively renders page sections as data arrives, replacing skeleton fallbacks with actual content. This dramatically improves perceived performance by showing instant visual feedback instead of blank screens during server-side data fetches.