import React from "react";import ReactDOM from "react-dom";import Redux,{createStore} from "redux";import { Provider } from "react-redux";import reducer from "./reducer.js";import Todo1 from "./todo1.js";const store = createStore(reducer);ReactDOM.render( <Provider store={store}> <Todo1></Todo1> </Provider> , document.getElementById("root"))将加粗部分改写成下面写法为什么会报错?const store = React.createStore(reducer);
1 回答
已采纳
李晓健
TA贡献1036条经验 获得超461个赞
你前面的 createStore 明明是从redux里面引入的,也就是说也应该是Redux.createStore 呀,怎么为什么要用React.createStore 呢?
添加回答
举报
0/150
提交
取消