Detuned Detuned - 1 year ago 102
React JSX Question

Should you dispatch or call next multiple times inside of a Redux middleware?

I'm curious, I've seen in middlewares, such as

where we want a single action to fire off multiple actions (e.g. REQUEST, SUCCESS, FAILURE). However, in the middleware, we're provided the
to be able to
these actions. Is there a reason for calling these additional actions with
over the

Answer Source

If you dispatch an action then it will go through all of the middleware chain again. On the other hand next just sends it along to the next middleware in the chain or straight to the reducers if there aren't any more middlewares.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download