我遇到了一个错误createStore
,我不明白为什么。
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import thunk from "redux-thunk"
import promise from "redux-promise-middleware"
import * as reducers from './reducers';
const middleware = applyMiddleware(promise(), thunk);
export default createStore(reducers, middleware);
以上是我的代码,我在行中得到错误
const middleware = applyMiddleware(promise(), thunk);
该错误预计 Reducer 是一个函数。我正在使用 React Native 0.37 和最新版本的 redux、redux-thunk 和 redux-promise-middleware。reducers 是 combineReducers 的结果。
提前致谢。