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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?