Skip to content
🍾 Flexible promise-based React data loader
JavaScript CSS
Branch: next
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Release v9.0.0 (#151) Oct 7, 2019
.codesandbox Release v9.0.0 (#151) Oct 7, 2019
.github Revert "GitBook: [master] 25 pages modified" Oct 7, 2019
.storybook Release v9.0.0 (#151) Oct 7, 2019
brand Release v9.0.0 (#151) Oct 7, 2019
codemods Revert "GitBook: [master] 25 pages modified" Oct 7, 2019
docs Add contribution docs. Oct 18, 2019
examples Bump version. Oct 7, 2019
packages Update project website link. Oct 18, 2019
stories Merge branch 'master' into next Oct 7, 2019
.all-contributorsrc Release v9.0.0 (#151) Oct 7, 2019
.eslintrc Release v9.0.0 (#151) Oct 7, 2019
.gitbook.yaml Release v9.0.0 (#151) Oct 7, 2019
.gitignore Release v9.0.0 (#151) Oct 7, 2019
.prettierrc Setup linting and prettier config. Dec 30, 2018
.travis.yml [wip] React Async DevTools (closes #43) (#44) Jul 3, 2019
CONTRIBUTING.md Release v9.0.0 (#151) Oct 7, 2019
LICENSE Update LICENSE. Mar 3, 2019
README.md Add links to contribution docs. Oct 18, 2019
babel.config.js Upgrade dependencies and improve test reporting. Aug 7, 2019
jest.config.js Ignore 'pkg' directory in tests. Aug 22, 2019
jest.setup.js Upgrade dependencies and improve test reporting. Aug 7, 2019
lerna.json Bump version. Oct 7, 2019
now.json Alias is already configured through the project settings. Sep 17, 2019
package.json Update dependency @testing-library/jest-dom to v4.1.2 (#170) Oct 16, 2019
react-async.png Update logo. Apr 5, 2019
renovate.json Add renovate.json (#85) Aug 22, 2019

README.md

React Async
Handle promises with ease.


latest version montly downloads minified size license
issues pull requests releases contributors
circleci status travis status code coverage code quality DeepScan grade
dependencies devDependencies peerDependencies
live examples Chromatic All Contributors

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
  • Comes with type definitions for TypeScript
  • Works well in React Native too!

Upgrading to v9

Version 9 comes with a minor breaking change. See Upgrading for details.

Documentation

Getting started

API

Guide

Contributing

Contributors

Thanks goes to these wonderful people (emoji key):

Gert Hengeveld
Gert Hengeveld

đź’» đź‘€ đź’¬
Khartir
Khartir

💻 📦
Lenz Weber
Lenz Weber

💻 📦 🤔
Avinash
Avinash

đź‘€ đź“–
Fred K. Schott
Fred K. Schott

🔧
Cedric van Putten
Cedric van Putten

đź’»
Tom Shane
Tom Shane

đź‘€
Philip Peterson
Philip Peterson

đź’»
Sibelius Seraphini
Sibelius Seraphini

đź‘€
Jim Cummins
Jim Cummins

đź‘€
Mihkel Sokk
Mihkel Sokk

đź‘€
Jiří Brabec
Jiří Brabec

đź’»
Andrii U
Andrii U

đź’ˇ
Matthisk Heimensen
Matthisk Heimensen

đź’»
Danny Hurlburt
Danny Hurlburt

🤔 📖
Noel Yoo
Noel Yoo

⚠️ 💻 🤔
Adam Ratcliffe
Adam Ratcliffe

đź’»
Kent C. Dodds
Kent C. Dodds

đź’»
walter-ind
walter-ind

đź“–
Jacob Lee
Jacob Lee

đź’»
Youngrok Kim
Youngrok Kim

đź’»
Munir Ahmed Elsangedy
Munir Ahmed Elsangedy

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

You can’t perform that action at this time.