Current implementation would make the dispatch function stop working in case of a broken reducer within a batch, since the batch counter would never reset properly:
Example:
/*
this would make redux throw an error, which would also freeze `batchDepth` at 1.
Subsequent dispatches will never reach the listeners.
*/
store.dispatch(["foo"]);
Although redux already wraps the reducers in a try block, if any other middleware overrides dispatch in a way that doesn't produce 100% breakage, or if user has a broken action, application would stop working completely until a refresh.
Current implementation would make the dispatch function stop working in case of a broken reducer within a batch, since the batch counter would never reset properly:
Example:
Although redux already wraps the reducers in a
try
block, if any other middleware overridesdispatch
in a way that doesn't produce 100% breakage, or if user has a broken action, application would stop working completely until a refresh.