Decision about Jest, redux-thunk, React, Redux.js, redux-saga

Avatar of dwjohnston

Choosing redux-saga for my async Redux.js middleware, for a React application, instead of the typical redux-thunk .

Redux-saga is much easier to test than Redux-thunk - it requires no module mocking at all. Converting from redux-thunk to redux-saga is easy enough, as you are only refactoring the action creators - not your redux store or your react components. I've linked a github repo that shows the same solution with both, including Jest tests.

10 upvotes·1 comment·9.3K views
ali imtiaz
ali imtiaz
·
January 21st 2019 at 5:11am

excellent read

·
Reply
Avatar of David Johnston