You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change enables a hack that is employed in a fairly famous library
called "redux-saga", where the middleware api is captured during the
call the "applyMiddleware" and subsequently used to dispatch more
actions and peek into state.
Note that this change does neither force this hack on others or
encourage it. There should be no observable change to existing
codebases.
Applying this function earlier also means that we don't have to redefine
the function on every invocation and re-create the middlewareApi object.
Finally, this is consistent with the implementation in the redux source
code: https://github.com/reactjs/redux/blob/e2e9648b264224af68add35431898dafe26b0a09/src/applyMiddleware.js
0 commit comments