You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mahdi
962e6f4137
|
2 years ago | |
---|---|---|
.. | ||
utils | 2 years ago | |
CHANGELOG.md | 2 years ago | |
README.md | 2 years ago | |
developmentOnly.d.ts | 2 years ago | |
developmentOnly.js | 2 years ago | |
index.d.ts | 2 years ago | |
index.js | 2 years ago | |
logOnly.d.ts | 2 years ago | |
logOnly.js | 2 years ago | |
logOnlyInProduction.d.ts | 2 years ago | |
logOnlyInProduction.js | 2 years ago | |
package.json | 2 years ago |
README.md
Redux DevTools Extension's helper
Usage
Install:
npm install --save redux-devtools-extension
and use like that:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const store = createStore(
reducer,
composeWithDevTools(
applyMiddleware(...middleware)
// other store enhancers if any
)
);
or if needed to apply extension’s options:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
const composeEnhancers = composeWithDevTools({
// Specify here name, actionsBlacklist, actionsCreators and other options
});
const store = createStore(
reducer,
composeEnhancers(
applyMiddleware(...middleware)
// other store enhancers if any
)
);
There’re just few lines of code. If you don’t want to allow the extension in production, just use ‘redux-devtools-extension/developmentOnly’ instead of ‘redux-devtools-extension’.
License
MIT