An open API service indexing awesome lists of open source software.

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?

Awesome Lists containing this project

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 team

All the details are explained on CoderOne's youtube channel: https://youtu.be/Kjkx2BASAZA