TypeError:调度不是indexaction.js的功能.JS:66在包裹中(spread.js:25)



这是我的代码

我该怎么解决此问题?

您需要设置redux-thunk才能异步分配操作。有关更多信息,请转到redux-thunk文档。

...
import thunk from 'redux-thunk';
...
const store = createStore(novelReducer, undefined, compose(
    applyMiddleware(thunk, routerMiddleware(history)),
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
))
...

最新更新