- Notifications
You must be signed in to change notification settings - Fork90
🍾 Flexible promise-based React data loader
License
NotificationsYou must be signed in to change notification settings
async-library/react-async
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
React component and hook for declarative promise resolution and data fetching. Makes it easy to handle everystate of the asynchronous process, without assumptions about the shape of your data or the type of request.Use it withfetch, Axios or other data fetching libraries, even GraphQL.
- Zero dependencies
- Works with promises, async/await and the Fetch API
- Now with experimental Suspense support
- Choose between Render Props, Context-based helper components or the
useAsyncanduseFetchhooks - Debug and develop every part of the loading sequence with the React Async DevTools
- Provides convenient
isPending,startedAt,finishedAt, et al metadata - Provides
cancelandreloadactions - Automatic re-run using
watchorwatchFnprop - Accepts
onResolve,onRejectandonCancelcallbacks - Supportsabortable fetch by providing an AbortController
- Supports optimistic updates using
setData - Supports server-side rendering through
initialValue - Written in TypeScript, ships with type definitions
- Works well in React Native too!
Version 9 comes with a minor breaking change.SeeUpgrading for details.
Thanks goes to these wonderful people (emoji key):
This project follows theall-contributors specification. Contributions of any kind welcome!
About
🍾 Flexible promise-based React data loader
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
