📅  最后修改于: 2022-03-11 14:55:55.388000             🧑  作者: Mango
For me, the solution was to add `redux-thunk` as a middleware, so inside my
store configuration file, I passed redux-thunk as middleware.
import reducerData from './store-reducer';
import {applyMiddleware, compose, createStore} from 'redux';
import ReduxThunk from 'redux-thunk';
const middlewares = [ReduxThunk];
const store = createStore(
reducerData,
compose(applyMiddleware(...middlewares)),
);
export default store;