Skip to content

Why you should use react-query instead of useEffects for API Calls?

Notifications You must be signed in to change notification settings

ipenywis/react-query-useEffect

Repository files navigation

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

About

Why you should use react-query instead of useEffects for API Calls?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published