What are the differences between redux-saga and redux-thunk?

Technology CommunityCategory: ReduxWhat are the differences between redux-saga and redux-thunk?
VietMX Staff asked 3 years ago

Both Redux Thunk and Redux Saga take care of dealing with side effects. In most of the scenarios, Thunk allows Promises to deal with them, whereas Saga uses Generators.

Thunk is simple to use and Promises are familiar to many developers, Saga/Generators are more powerful but you will need to learn them. But both the two middleware can coexists, so you can start with Thunks and introduce Sagas when/if you need them.