Created
February 18, 2017 22:02
-
-
Save dabit3/1f15667fcd8dc54133f5891039c6229b to your computer and use it in GitHub Desktop.
Medium - redux4ways - Redux Saga configureStore.js
This file contains 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 } from 'redux' | |
import app from './reducers' | |
import createSagaMiddleware from 'redux-saga' | |
import dataSaga from './saga' | |
const sagaMiddleware = createSagaMiddleware() | |
export default function configureStore() { | |
const store = createStore(app, applyMiddleware(sagaMiddleware)) | |
sagaMiddleware.run(dataSaga) | |
return store | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment