3 ms·
Sagas are a great power tool, but most Redux apps don't need them. That's why we opted to include thunks out of the box as part of our official Redux Toolkit pa
by acemarke 6y ago
Sagas are a great power tool, but most Redux apps don't need them. That's why we opted to include thunks out of the box as part of our official Redux Toolkit package:
https://blog.isquaredsoftware.com/2020/02/blogged-answers-why-redux-toolkit-uses-thunks-for-async-logic/ https://blog.isquaredsoftware.com/2020/02/blogged-answers-wh...
(You can still customize the middleware when using RTK to set up your store, same as always, so if you want to use sagas you still can.)
That said, there's a lot of things thunks _can't_ do, and for those use cases it makes sense to use sagas or observables.