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
The devToolsExtension enhancer in pageScript.js take three arguments: reducer, preloadedState, and config. This means that if you have an enhancer chain like:
The enhancers passed by middlewareThatUsesEnhancers to createStore will never get fired. This is the cause of issues like redux-offline/redux-offline#66 — any enhancer that internally calls additional enhancers will not work with redux devtools as the rightmost enhancer.
I'll try to put together a PR shortly, but in the interim, you can add the following to your enhancer chain:
constcompose=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;constenhancer=compose(applyMiddleware(...middleware),middlewareThatUsesEnhancers(),// Add this to the end of your enhancer chain:(createStore)=>(reducer,preloadedState,enhancer)=>enhancer(createStore)(reducer,preloadedState));
The text was updated successfully, but these errors were encountered:
However, we better just throw an error in the previous case to avoid the confusion. Not to break those who are using it (as intended initially), we should start with a warning.
The
devToolsExtension
enhancer inpageScript.js
take three arguments:reducer
,preloadedState
, andconfig
. This means that if you have an enhancer chain like:The enhancers passed by
middlewareThatUsesEnhancers
tocreateStore
will never get fired. This is the cause of issues like redux-offline/redux-offline#66 — any enhancer that internally calls additional enhancers will not work with redux devtools as the rightmost enhancer.I'll try to put together a PR shortly, but in the interim, you can add the following to your enhancer chain:
The text was updated successfully, but these errors were encountered: