1//add middleware in store
2 window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
1 const store = createStore(
2 reducer, /* preloadedState, */
3+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
4 );
1 const store = createStore(
2 reducer, /* preloadedState, */
3+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
4 );
5
1import { createStore, applyMiddleware } from 'redux';
2import { composeWithDevTools } from 'redux-devtools-extension';
3
4const store = createStore(reducer, composeWithDevTools(
5 applyMiddleware(...middleware),
6 // other store enhancers if any
7));