Created
July 30, 2019 12:53
-
-
Save eserdinyo/96a54440d654372af231fd0f34ea3440 to your computer and use it in GitHub Desktop.
Add redux devtools to store with middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, applyMiddleware, compose } from 'redux'; | |
import createSagaMiddleware from 'redux-saga' | |
import rootReducer from './store' | |
const sagaMiddleware = createSagaMiddleware() | |
const store = createStore(rootReducer, compose( | |
applyMiddleware(sagaMiddleware), | |
window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment