项目作者: CharlesStover

项目描述 :
ReactN DevTools allow you to view your ReactN state with the Redux DevTools browser extension
高级语言: TypeScript
项目地址: git://github.com/CharlesStover/reactn-devtools.git
创建时间: 2019-05-23T15:53:26Z
项目社区:https://github.com/CharlesStover/reactn-devtools

开源协议:MIT License

下载


ReactN DevTools Tweet version minzipped size downloads build chat

ReactN DevTools allow you to view your ReactN state with the Redux DevTools
browser extension.

Install

Install the DevTools package as a dependency in your project with:

  • npm install reactn-devtools or
  • yarn add reactn-devtools

Use

If you are unsure whether or not you need to add ReactN DevTools to your
default global state or to a Provider, then you need to add ReactN DevTools to
your default global state.

Default Global State

To attach ReactN DevTools to your default global state (most common use case),
add the following code snippet to your src/index.js file:

  1. import addReactNDevTools from 'reactn-devtools';
  2. addReactNDevTools();

Default Global State with Options

To attach ReactN DevTools to your default global state with options, add the
following code snippet to your src/index.js file:

  1. import addReactNDevTools from 'reactn-devtools';
  2. addReactNDevTools({ /* options here */ });

For a list of options, see
redux-devtools-extension‘s Options.

Provider

To attach ReactN DevTools to your ReactN Provider, add the following code
snippet to the file that creates the Provider:

  1. import { createProvider } from 'reactn';
  2. import addReactNDevTools from 'reactn-devtools';
  3. const Provider = createProvider({
  4. // ...
  5. });
  6. addReactNDevTools(Provider);

Provider with Options

To attach ReactN DevTools to your ReactN Provider with options, add the
following code snippet to the file that creates the Provider:

  1. import { createProvider } from 'reactn';
  2. import addReactNDevTools from 'reactn-devtools';
  3. const Provider = createProvider({
  4. // ...
  5. });
  6. addReactNDevTools(Provider, { /* options */ });

For a list of options, see
redux-devtools-extension‘s Options.

Sponsor 💗

If you are a fan of this project, you may
become a sponsor
via GitHub’s Sponsors Program.