一、在应用商城 安装chrome 插件git
redux_dev_toolsgithub
二、配置chrome
https://github.com/zalmoxisus/redux-devtools-extension#usageredux
在index.js配置 添加插件
import { createStore } from 'redux' // 引入createStore方法 import reducer from './reducer' const store = createStore(reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()) // 建立数据存 储仓库 【新增长】 export default store //暴露出去
其实就是加了这样一句话.code
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()