这是我的代码
我该怎么解决此问题?
您需要设置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__()
))
...