chrome扩展程序里搜索Redux DevTools进行安装

新建store的时候,进行如下配置。

import { createStore, applyMiddleware ,compose} from 'redux';
import reducer from './reducer'
import thunk from 'redux-thunk'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?   window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
const store=createStore(reducer,composeEnhancers(applyMiddleware(thunk)));
export default store;

 

相关文章:

  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-12-18
  • 2022-02-26
  • 2022-02-25
猜你喜欢
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-12-02
相关资源
相似解决方案