Suspense boundary design
Skill naporin0624/claude-plugin-hono-electron/skills/suspense-boundary-design
Design React Suspense boundaries interactively. Use when planning loading states, configuring boundary granularity, or combining with ErrorBoundary.From its SKILL.md
npx -y skills add naporin0624/claude-plugin-hono-electron --skill suspense-boundary-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.1 KB, as published. Nobody here has run it
Suspense Boundary Design
Interview Questions
- Loading units - Which components load independently?
- Error handling - Show error UI, retry button, or bubble up?
- Loading UI - Skeleton, spinner, or shimmer?
Pattern
import { ErrorBoundary } from 'react-error-boundary';
<ErrorBoundary FallbackComponent={ErrorFallback}>
<Suspense fallback={<Skeleton />}>
<AsyncComponent />
</Suspense>
</ErrorBoundary>
Rule: ErrorBoundary wraps Suspense (outside).
Best Practices
- Match skeleton to content size (prevents layout shifts)
- Avoid nested Suspense unless intentional waterfall
- Group components sharing data under same boundary
Related
- jotai-reactive-atoms/HYBRID-ATOM.md - Suspense with async atoms