1 | # Redux DevTools Extension's helper
|
2 |
|
3 | [![Join the chat at https://gitter.im/zalmoxisus/redux-devtools-extension](https://badges.gitter.im/zalmoxisus/redux-devtools-extension.svg)](https://gitter.im/zalmoxisus/redux-devtools-extension?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4 |
|
5 | ## Usage
|
6 |
|
7 | Install:
|
8 |
|
9 | ```
|
10 | npm install --save redux-devtools-extension
|
11 | ```
|
12 |
|
13 | and use like that:
|
14 |
|
15 | ```js
|
16 | import { createStore, applyMiddleware } from 'redux';
|
17 | import { composeWithDevTools } from 'redux-devtools-extension';
|
18 |
|
19 | const store = createStore(
|
20 | reducer,
|
21 | composeWithDevTools(
|
22 | applyMiddleware(...middleware)
|
23 | // other store enhancers if any
|
24 | )
|
25 | );
|
26 | ```
|
27 |
|
28 | or if needed to apply [extension’s options](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#windowdevtoolsextensionconfig):
|
29 |
|
30 | ```js
|
31 | import { createStore, applyMiddleware } from 'redux';
|
32 | import { composeWithDevTools } from 'redux-devtools-extension';
|
33 |
|
34 | const composeEnhancers = composeWithDevTools({
|
35 | // Specify here name, actionsBlacklist, actionsCreators and other options
|
36 | });
|
37 | const store = createStore(
|
38 | reducer,
|
39 | composeEnhancers(
|
40 | applyMiddleware(...middleware)
|
41 | // other store enhancers if any
|
42 | )
|
43 | );
|
44 | ```
|
45 |
|
46 | There’re just [few lines of code](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/index.js). If you don’t want to allow the extension in production, just use ‘redux-devtools-extension/developmentOnly’ instead of ‘redux-devtools-extension’.
|
47 |
|
48 | ## License
|
49 |
|
50 | MIT
|