Skip to content

Instantly share code, notes, and snippets.

@eserdinyo
Created July 30, 2019 12:53
Show Gist options
  • Save eserdinyo/96a54440d654372af231fd0f34ea3440 to your computer and use it in GitHub Desktop.
Save eserdinyo/96a54440d654372af231fd0f34ea3440 to your computer and use it in GitHub Desktop.
Add redux devtools to store with middleware
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