Answer the question
In order to leave comments, you need to log in
Bug with redux-saga?
Hello.
I'm working with a saga and I get an error - Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware .
I broke my whole head what is wrong, I don’t understand why it happens. Writes an error in configureStore.js https://codesandbox.io/s/l4qjorjxjq . Thanks in advance
Answer the question
In order to leave comments, you need to log in
You start the saga before the store is created.
const configureStore = history => {
const store = createStore(
rootReducer(history),
composeWithDevTools(
applyMiddleware(routerMiddleware(history), sagaMiddleware, logger)
)
);
sagaMiddleware.run(rootSaga);
return store;
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question