react-async

? Flexible promise-based React data loader

  • 所有者: async-library/react-async
  • 平台:
  • 许可证: ISC License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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):

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

Similar projects

主要指标

概览
名称与所有者async-library/react-async
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证ISC License
所有者活动
创建于2018-08-12 11:53:05
推送于2025-08-27 17:25:11
最后一次提交2020-03-27 23:32:07
发布数68
最新版本名称v10.0.1 (发布于 )
第一版名称v3.0.0 (发布于 2018-08-13 14:13:09)
用户参与
星数2.1k
关注者数13
派生数91
提交数824
已启用问题?
问题数114
打开的问题数31
拉请求数139
打开的拉请求数26
关闭的拉请求数54
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?