Skip to content

Latest commit

History

History
165 lines (143 loc) 路 14.5 KB

README.md

File metadata and controls

165 lines (143 loc) 路 14.5 KB

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