React redux-devtools 安装详解

一、下载 React developertools 

下载地址:https://www.extfans.com/extension/lmhkpmbekcpmknklioeibfkpmmfibljd/

二、安装 

启动项目F12,点击  the instructions.

添加到store

//store
import {createStore} from 'redux';
import reducer from './reducer';

import React from "react";

const store=createStore(reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());

export default store;

三、测试

打开浏览器

发布了117 篇原创文章 · 获赞 32 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/qq_17025903/article/details/102695381