Reputation: 1495
In this tutorial, the author exports the below code and passes the entire called function, which returns an object, to the store
prop in Provider
. How does the runSaga
part get ran? I don't see this in the docs.
const configureStore = () => {
const sagaMiddleware = createSagaMiddleware();
return {
...createStore(rootReducer,
applyMiddleware(sagaMiddleware)),
runSaga: sagaMiddleware.run(rootSaga)
};
};
Upvotes: 0
Views: 68
Reputation: 1244
I guess it's missing from the tutorial.
Look at the example at the official page of redux-saga
.
The example explicitly calls the function runSaga
Upvotes: 1