Data fetching and caching using redux-saga.  Use our saga middleware system to quickly build data loading within your redux application. Libraries lik

neurosnap / saga-query

submited by
Style Pass
2021-06-17 14:00:06

Data fetching and caching using redux-saga. Use our saga middleware system to quickly build data loading within your redux application.

Libraries like react-query, rtk-query, and apollo-client are making it easier than ever to fetch and cache data from an API server. All of them have their unique attributes and I encourage everyone to check them out.

I find that the async flow control of redux-saga is one of the most robust and powerful declaractive side-effect systems I have used. Treating side-effects as data makes testing dead simple and provides a powerful effect handling system to accomodate any use-case. Features like polling, data loading states, cancellation, racing, parallelization, optimistic updates, and undo are at your disposal when using redux-saga. Other libraries and paradigms can also accomplish the same tasks, but I think nothing rivals the readability and maintainability of redux/redux-saga.

All three libraries above are reinventing async flow control and hiding them from the end-developer. For the happy path, this works beautifully. Why learn how to cache API data when a library can do it for you? However:

Leave a Comment
Related Posts