TypeError:Object(...)不是函数错误,在reactJS中通过提供者传递存储时

时间:2019-03-02 17:16:26

标签: reactjs react-redux

enter image description here

我是React JS和redux的新手。将商店组件导入index.js时遇到问题。     我上传了屏幕截图以供参考。     请帮忙。

Code :
import {applyMiddleware,combineReducers,createStore} from 'react';
import numberReducer from '../app/reducers/numberReducer';
import nameReducer from '../app/reducers/nameReducer';
import  logger from 'redux-logger';

export default  createStore(combineReducers({
    name:nameReducer , 
    number:numberReducer
}),
{},
applyMiddleware(logger())
);

1 个答案:

答案 0 :(得分:1)

import {applyMiddleware,combineReducers,createStore} from 'react';

这是您的实际代码吗?这些应该从redux而不是react导入。