Awesome Open Source
Awesome Open Source

React Async
Handle promises with ease.


latest version montly downloads minzipped size license
circleci status travis status code coverage code quality DeepScan grade
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
  • Written in TypeScript, ships with type definitions
  • 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

💻 👀 💬

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 specification. Contributions of any kind welcome!

Similar projects

Alternatives To React Async
Select To Compare


Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,072,919
Reactjs (164,328
Promise (10,866
Promises (10,866
Fetch (8,867
Devtools (6,257