https://github.com/ipenywis/react-query-useEffect
Why you should use react-query instead of useEffects for API Calls?
https://github.com/ipenywis/react-query-useEffect
Last synced: 27 days ago
JSON representation
Why you should use react-query instead of useEffects for API Calls?
- Host: GitHub
- URL: https://github.com/ipenywis/react-query-useEffect
- Owner: ipenywis
- Created: 2022-10-09T22:26:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T20:56:25.000Z (about 2 years ago)
- Last Synced: 2024-11-13T17:45:33.510Z (7 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 58
- Watchers: 2
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - ipenywis/react-query-useEffect - Why you should use react-query instead of useEffects for API Calls? (JavaScript)
README
# Why you should use React Query instead of useEffect for API Calls?
This repo, gives great examples of why you should use react-query library for fetching and storing the state of your server-side data in React instead of gambling with useEffect and redux
- use react-query for fetching
- it has isLoading, error, isSuccess with a single hook
- It's smart about when to refetch and sharing data between components
- Uses cache cleverly giving you all the control
- Easy to use and makes it easier for your teamAll the details are explained on CoderOne's youtube channel: https://youtu.be/Kjkx2BASAZA