reactjs - Should you dispatch or call next multiple times inside of a Redux middleware? -
i'm curious, i've seen in middlewares, such redux-promise-middleware
want single action fire off multiple actions (e.g. request, success, failure). however, in middleware, we're provided dispatch
able dispatch
these actions. there reason calling these additional actions next(action)
on dispatch(action)
?
if dispatch action go through of middleware chain again. on other hand next sends along next middleware in chain or straight reducers if there aren't more middlewares.
Comments
Post a Comment