redux.js:91 Uncaught Error:期望reducer成为一个函数

时间:2018-06-11 10:30:56

标签: javascript react-redux es6-modules reducers

下面是一段代码: enter image description here

这是错误: enter image description here

1 个答案:

答案 0 :(得分:0)

假设减少者'是你的组合/根减速器,试试这个:

import { createStore, applyMiddleware, compose } from 'redux';

const store = createStore( reducers, compose( applyMiddleware( ReduxPromise )) )

然后:

<Provider store={ store } >