Skip to content

Instantly share code, notes, and snippets.

@pmyagkov
Created December 26, 2016 14:17
Show Gist options
  • Select an option

  • Save pmyagkov/2adeb8f3a268bcc7e19a6a061dfce290 to your computer and use it in GitHub Desktop.

Select an option

Save pmyagkov/2adeb8f3a268bcc7e19a6a061dfce290 to your computer and use it in GitHub Desktop.
import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from 'app/reducers'
import { userAuthenticateSaga } from 'app/sagas/userSaga'
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const sagaMiddleware = createSagaMiddleware()
const store = composeEnhancers(
applyMiddleware(sagaMiddleware)
)(createStore)(reducer)
sagaMiddleware.run(userAuthenticateSaga)
export default store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment