mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
.. | ||
utils | ||
CHANGELOG.md | ||
developmentOnly.d.ts | ||
developmentOnly.js | ||
index.d.ts | ||
index.js | ||
logOnly.d.ts | ||
logOnly.js | ||
logOnlyInProduction.d.ts | ||
logOnlyInProduction.js | ||
package.json | ||
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