Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/async-library/react-async
🍾 Flexible promise-based React data loader
https://github.com/async-library/react-async
Last synced: about 2 months ago
JSON representation
🍾 Flexible promise-based React data loader
- Host: GitHub
- URL: https://github.com/async-library/react-async
- Owner: async-library
- License: isc
- Created: 2018-08-12T11:53:05.000Z (almost 6 years ago)
- Default Branch: next
- Last Pushed: 2024-04-11T15:42:15.000Z (3 months ago)
- Last Synced: 2024-04-14T13:58:46.241Z (3 months ago)
- Language: JavaScript
- Homepage: https://docs.react-async.com/
- Size: 4.73 MB
- Stars: 2,143
- Watchers: 13
- Forks: 94
- Open Issues: 58
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Lists
- awesome-list - react-async - based React data loader | async-library | 2001 | (JavaScript)
- awesome-concurrent-react - react-async - Flexible promise-based React data loader. (Data Fetching Libraries)
- awesome-stars - react-async - based React data loader | async-library | 2092 | (JavaScript)
- awesome-stars - react-async - 🍾 Flexible promise-based React data loader (JavaScript)
- awesome-use - async-library/react-async
- awesome-stars - react-async - 🍾 Flexible promise-based React data loader (JavaScript)
- awesome-stars - async-library/react-async - 🍾 Flexible promise-based React data loader (JavaScript)
README
React component and hook for declarative promise resolution and data fetching. Makes it easy to handle every
state of the asynchronous process, without assumptions about the shape of your data or the type of request.
Use it with `fetch`, 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 `useAsync` and `useFetch` hooks
- Debug and develop every part of the loading sequence with the React Async DevTools
- Provides convenient `isPending`, `startedAt`, `finishedAt`, et al metadata
- Provides `cancel` and `reload` actions
- Automatic re-run using `watch` or `watchFn` prop
- Accepts `onResolve`, `onReject` and `onCancel` callbacks
- Supports [abortable 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![abortable fetch]: https://developers.google.com/web/updates/2017/09/abortable-fetch
> ## Upgrading to v9
>
> Version 9 comes with a minor breaking change.
> See [Upgrading](https://docs.react-async.com/getting-started/upgrading) for details.# Documentation
- [Introduction](https://docs.react-async.com/)
## Getting started
- [Installation](https://docs.react-async.com/getting-started/installation)
- [Upgrading](https://docs.react-async.com/getting-started/upgrading)
- [Usage](https://docs.react-async.com/getting-started/usage)
- [DevTools](https://docs.react-async.com/getting-started/devtools)## API
- [Interfaces](https://docs.react-async.com/api/interfaces)
- [Configuration options](https://docs.react-async.com/api/options)
- [State properties](https://docs.react-async.com/api/state)
- [Helper components](https://docs.react-async.com/api/helpers)## Guide
- [Async components](https://docs.react-async.com/guide/async-components)
- [Separating view and logic](https://docs.react-async.com/guide/separating-view-logic)
- [Async actions](https://docs.react-async.com/guide/async-actions)
- [Optimistic updates](https://docs.react-async.com/guide/optimistic-updates)
- [Server-side rendering](https://docs.react-async.com/guide/server-side-rendering)## Contributing
- [Introduction](https://docs.react-async.com/contributing/introduction)
- [Setting up](https://docs.react-async.com/contributing/setting-up)
- [Development](https://docs.react-async.com/contributing/development)
- [Testing](https://docs.react-async.com/contributing/testing)
- [Releasing](https://docs.react-async.com/contributing/releasing)# Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Gert Hengeveld
💻 👀 💬
Khartir
💻 📦
Lenz Weber
💻 📦 🤔
Avinash
👀 📖
Fred K. Schott
🔧
Cedric van Putten
💻
Tom Shane
👀
Philip Peterson
💻
Sibelius Seraphini
👀
Jim Cummins
👀
Mihkel Sokk
👀
Jiří Brabec
💻
Andrii U
💡
Matthisk Heimensen
💻
Danny Hurlburt
🤔 📖
Noel Yoo
⚠️ 💻 🤔
Adam Ratcliffe
💻
Kent C. Dodds
💻
walter-ind
📖
Jacob Lee
💻
Youngrok Kim
💻
Munir Ahmed Elsangedy
🤔
AlixWang
📖
Sal Olivares
💻 🐛
Neale Upstone
💻
Martin Barksten
📖
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Similar projects
- [@slorber/react-async-hook](https://github.com/slorber/react-async-hook)
- [@dai-shi/react-hooks-async](https://github.com/dai-shi/react-hooks-async)
- [@cristovao-trevisan/async-resource](https://github.com/cristovao-trevisan/async-resource)
- [@ilyalesik/react-fetch-hook](https://github.com/ilyalesik/react-fetch-hook)
- [@marcin-piela/react-fetching-library](https://github.com/marcin-piela/react-fetching-library)