Skip to content

medhatdawoud/react-async

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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
  • 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

πŸ€”
AlixWang
AlixWang

πŸ“–

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

Similar projects

About

🍾 Flexible promise-based React data loader

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.3%
  • CSS 0.7%