Last time I was responsible for refactoring React app project that was built with Redux Saga, Honestly That sucked!
Boilerplate code was everywhere, and the app complexity was very high.
You had to handle errors, loadings, data... everything manually.
Solutions like caching were also not available out of the box.
What I have done I used React hooks and React context as well as the outstanding library #React Query
It brought 4 benefits:
- Less boilerplate code
- Easy to implement and understand
- Fetch, synchronize, update, and cache your remote data
- No need to put your remote data inside the global state
If you are building a React app with:
- Client-side rendering
- Lots of server data to handle
Don't think more about it.
You have to use React Query.
It's a game-changer!
Latest comments (0)