0
還原getState
方法不可用。我是否需要任何中間件來達到預期的效果?以下是代碼無法訪問非反應組件上的商店
const configureStore = (initialState = {}) => {
return createStore(
rootReducer,
initialState,
applyMiddleware(...middleware),
);
};
export default configureStore;
util.js中
import store from '../../store';
store.getState()
// _store2.default.getState is not a function