Open lllzzzggg opened 6 years ago
const sagaMiddleware = createSagaMiddleware() const store = createStore( reducer, applyMiddleware(createSagaMiddleware(helloSaga)) ) sagaMiddleware.run(helloSaga)
改成下面这样就好了 const sagaMiddleware = createSagaMiddleware() const store = createStore( reducer, applyMiddleware(sagaMiddleware) ) sagaMiddleware.run(helloSaga)
改成下面这样就好了 const sagaMiddleware = createSagaMiddleware() const store = createStore( reducer, applyMiddleware(sagaMiddleware) ) sagaMiddleware.run(helloSaga) @astonishqft
不执行,最后一行改为sagaMiddleware.run(rootSaga)
就可以了
Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware