shastajs / shasta

Dead simple + opinionated toolkit for building redux/react applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider redux-saga middleware?

slorber opened this issue · comments

Hello,

Instead of Redux-thunk, what about using something more functional and testable?
I think Redux-saga is a superior alternative to async middlewares, but you may not like so much the generators syntax

See
http://stackoverflow.com/a/34623840/82609
jaysoo.ca/2016/01/03/managing-processes-in-redux-using-sagas

Have to agree with this. After using redux-saga for a day it's benefits become immediately obvious. It really helps with logic centralisation and complex async workflow, whilst being easy to reason about and test.

Definitely open to it!

The goal behind adding redux-thunk was to have a core that supports things people are doing already in the ecosystem (async actions) - making somebody install a module so that they can use some other module seems roundabout. If people are using sagas a lot, that would be a good reason to add it.

Can you link some of your favorite sagas you use?