Search code examples
reduxredux-sagaredux-thunk

Redux with redux saga/redux thunk. Why some people says I shouldnt use thunk now because theres a saga


Im learning redux middleware, saga and thunknspecifically and I'm kinda confuse on why theres two exisiting middleware if they doing the same and benefiting your app. And I read some in the blog/post that saga much good compared to thunk.


Solution

  • This is an "apples and oranges" question.

    Redux-Saga is an async side effects addon for the Redux core state management library. You can use Redux by itself, or Redux-Saga with Redux, but this is not an "A or B" choice - they don't do the same thing at all.