Skip to content

Manage asynchronous operations, timing, error handling, detecting intersection of elements, and caching easily (One of TanStack Query community resources)

License

Notifications You must be signed in to change notification settings

toss/suspensive

Repository files navigation

Suspensive Libraries Logo - TypeScript/JavaScript packages to use React Suspense easily.

Manage asynchronous operations, timing, error handling, detecting intersection of elements, and caching easily

MIT License codecov CodSpeed Badge GitHub stars


Available Packages

This package offers components that leverage React Suspense to handle asynchronous operations gracefully. It includes components like Suspense, ErrorBoundary, and ErrorBoundaryGroup, along with utilities like Delay for managing timing in your React applications.

Key features: Suspense, ErrorBoundary, ErrorBoundaryGroup, Delay, and more.

This package enhances React Query with Suspense support, allowing for simpler and more declarative data fetching. It provides hooks like useSuspenseQuery and useSuspenseInfiniteQuery, which integrate seamlessly with React Suspense. Additionally, it includes QueryErrorBoundary for handling errors during data fetching.

Key features: useSuspenseQuery, useSuspenseQueries, useSuspenseInfiniteQuery, queryOptions, QueryErrorBoundary, Mutation, and more.

This package builds on the Jotai state management library, adding features that work well with React Suspense. It provides utilities for managing state using atoms, which can be easily integrated into Suspense-based workflows.

Key features: Atom, AtomValue, SetAtom, and more.

@suspensive/cache npm version npm npm bundle size

This package provides caching solutions that can be used within React applications. It includes hooks like useCache and useCacheStore, as well as providers for managing and storing cache data efficiently.

Key features: Cache, useCache, CacheStore, useCacheStore, CacheStoreProvider, and more.

@suspensive/intersection MIT License

This package is designed to simplify the detection and management of elements within the viewport using the Intersection Observer API. It will provide React hooks and components to help developers efficiently track element visibility and perform actions when elements enter or leave the viewport. This can be particularly useful for lazy loading images, implementing infinite scroll, and triggering animations as elements come into view.

Status: Work In Progress.


Visit suspensive.org for docs, guides, API and more!

English | 한국어


Contributing

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.

Contributors

contributors


Toss

MIT © Viva Republica, Inc. See LICENSE for details.