react:redux_dev_tools的安装

一、在应用商城 安装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__()
相关文章
相关标签/搜索