manaflair / redux-batch

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

Fix for graceful error propagation #32

Open olessavluk opened 2 years ago

olessavluk commented 2 years ago

Hello!

Currently, if an error is thrown during dispatch - it breaks future store notifications. This PR should fix that, to match the default dispatch behaviour.

Steps to reproduce:

  1. Place intentional error in reducer
  2. Dispatch action that crashes in the reducer
  3. Dispatch other actions and you will see that listeners do not get notified of state changes. Compared with "plain" redux where listeners updated

Let me know if the issue & this solution is clear to you

pdesantis commented 2 years ago

@olessavluk thanks for this!