Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oyvindberg/use-remote-data
Promise handling for react. Principled, Boilerplate-free, Caching, Invalidating
https://github.com/oyvindberg/use-remote-data
fetch fp hooks react remote-data rest
Last synced: 3 months ago
JSON representation
Promise handling for react. Principled, Boilerplate-free, Caching, Invalidating
- Host: GitHub
- URL: https://github.com/oyvindberg/use-remote-data
- Owner: oyvindberg
- License: mit
- Created: 2021-06-20T18:09:12.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-14T11:11:15.000Z (about 2 years ago)
- Last Synced: 2024-10-11T15:45:16.358Z (3 months ago)
- Topics: fetch, fp, hooks, react, remote-data, rest
- Language: TypeScript
- Homepage: https://oyvindberg.github.io/use-remote-data/
- Size: 1.12 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Awesome data access for React
Start with the [documentation](https://oyvindberg.github.io/use-remote-data/)
### Some background
Based on the pattern described in this article:
- https://medium.com/@gcanti/slaying-a-ui-antipattern-with-flow-5eed0cfb627b
Through react hooks and the `RemoteDataStore` abstraction on top of `RemoteData`, this library also provides:
- lazy loading - only data which is necessary to render is fetched
- invalidation - you specify how long the data should live, and it'll be automatically updated
- sharing references to stores between components and deduplicating fetches
- retrying failed fetches### prior art
- https://github.com/devexperts/remote-data-ts
- https://github.com/mcollis/remote-data
- https://github.com/skkallayath/react-remote-data-hooks
- https://github.com/devexperts/remote-data-ts