manaflair / redux-batch

Enhance your Redux store to support batched actions
171 stars 12 forks source link

Redux-saga ignores batched actions dispatched within a saga #13

Closed pzaj2 closed 6 years ago

pzaj2 commented 6 years ago

So, I have a scenario in which, inside the saga I put multiple actions - put([action1, action2]) - and it works fine with reducers. Unfortunately that's not the case for sagas, they simply ignore these actions. Any idea if this can be fixed in redux-batch or should I be looking for the cause in redux-saga?

arcanis commented 6 years ago

I'm not sure, it worked last time I checked, and I can't really tell what happens without an easy to reproduce test case.

srubin commented 2 years ago

@arcanis Here's a repro case that demonstrates the issue: https://github.com/srubin/redux-batch-saga-bug

I did a small amount of debugging, and it looks like the redux-saga middleware is putting the batch action directly on the channel, not unwrapping it into separate actions.