“No store found” when using Redux chrome extension

后端 未结 7 1078
轮回少年
轮回少年 2021-01-11 11:57

I have a problem with redux chrome extension.

I have the following code in my configureStore.js file :

import {createStore, applyMiddleware} from \'         


        
相关标签:
7条回答
  • 2021-01-11 12:41

    Ok, just checking the official repository of the Redux Dev Tools I found they recommend to use __REDUX_DEVTOOLS_EXTENSION__ instead of devToolsExtension as you are using.

    So after just this update my code and de connectino with the plugin start working like a charm.

    Here a sample code if it helps anyone:

    const enhancers = compose(
      window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
      );
    
    const store = createStore(
      rootReducer,
      defaultState,
      enhancers
    );
    
    0 讨论(0)
提交回复
热议问题