Created
December 26, 2016 14:17
-
-
Save pmyagkov/2adeb8f3a268bcc7e19a6a061dfce290 to your computer and use it in GitHub Desktop.
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 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