Closed mukeshsoni closed 9 years ago
Why does the second level function (which is passed the next function ref) needed? The way applyMiddleware works, the dispatch functions returned by the middleware are stored as such -
next
store.dispatch = middleware(store)(store.dispatch);
Why can't the next be simply passed as the second parameter in the first middleware function call?
No particular reason. We might choose to fix this later: https://github.com/rackt/redux/pull/784
got it. Thanks!
Why does the second level function (which is passed the
next
function ref) needed? The way applyMiddleware works, the dispatch functions returned by the middleware are stored as such -Why can't the
next
be simply passed as the second parameter in the first middleware function call?