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)
)
)
or if needed to apply extension’s options:
import { createStore, applyMiddleware } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
const composeEnhancers = composeWithDevTools({
})
const store = createStore(
reducer,
composeEnhancers(
applyMiddleware(...middleware)
)
)
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