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