toss/suspensive
toss/suspensive has 1,059 GitHub stars and 99 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 11:23 UTC. Last push 2026-11-01.
All-in-one for React Suspense — ErrorBoundary with shouldCatch, clientOnly to skip SSR for a boundary, Delay, and more
What you can do
- <ErrorBoundary/> with shouldCatch — catch only the errors you want (comparison with react-error-boundary)
- <ErrorBoundaryGroup/> — reset multiple error boundaries at once, no prop drilling
- <Suspense/> with clientOnly — declaratively skip SSR for a boundary when you need client-only rendering
- <SuspenseQuery/> — declarative data fetching as JSX, no hook constraints
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalWhat is Suspensive?
React gives you Suspense, lazy, and an interface to build Error Boundaries — but using them in real applications reveals gaps. Suspensive fills those gaps with declarative components and hooks.
import { Delay, ErrorBoundary, ErrorBoundaryGroup, Suspense } from '@suspensive/react'
const Page = () => (
<ErrorBoundaryGroup>
<ErrorBoundaryGroup.Consumer>
{({ reset }) => <button onClick={reset}>Reset All</button>}
</ErrorBoundaryGroup.Consumer>
<ErrorBoundary
shouldCatch={NetworkError}
fallback={({ error, reset }) => <ErrorUI error={error} onRetry={reset} />}
>
<Suspense
clientOnly
fallback={
<Delay ms={200}>
{({ isDelayed }) => <Spinner style={{ opacity: isDelayed ? 1 : 0, transition: 'opacity 200ms' }} />}
</Delay>
}
>
<Content />
</Suspense>
</ErrorBoundary>
</ErrorBoundaryGroup>
)
shouldCatch— catch only specific error types, let others propagateErrorBoundaryGroup— reset multiple error boundaries at once, no prop drillingclientOnly— skip SSR for a Suspense boundary (fallback on server, children on client)Delay— prevent flash-of-loading-state with render props for smooth fade-inreset— built into the fallback props, no external state needed
Packages
| Package | Description | Version |
|---|---|---|
| @suspensive/react | Suspense, ErrorBoundary, ErrorBoundaryGroup, Delay, ClientOnly | |
| @suspensive/react-query | SuspenseQuery, SuspenseInfiniteQuery, Mutation, PrefetchQuery | |
| @suspensive/jotai | Atom, AtomValue, SetAtom for Jotai integration | |
| @suspensive/codemods | Automated migration codemods |
Key Features
<ErrorBoundary/>withshouldCatch— catch only the errors you want (comparison with react-error-boundary)<ErrorBoundaryGroup/>— reset multiple error boundaries at once, no prop drilling<Suspense/>withclientOnly— declaratively skip SSR for a boundary when you need client-only rendering<SuspenseQuery/>— declarative data fetching as JSX, no hook constraints<Delay/>— prevent flash-of-loading-state UX issues<DefaultPropsProvider/>— set global default fallbacks for all components
Getting Started
npm install @suspensive/react
Visit suspensive.org for full documentation.
Contributors
Read our Contributing Guide to familiarize yourself with Suspensive's development process, how to suggest bug fixes and improvements, and the steps for building and testing your changes.
MIT © Viva Republica, Inc. See LICENSE for details.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,824 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,451 starsreact/react
The library for web and native user interfaces.
252,457 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,624 stars