在 src文件夹下面 建立一个文件夹 store仓库
在store里面建立一个index.js 的文件
引入 createStore是redux的一个方法
再声明一个变量为这个方法。
注明: 在react中,是js文件, .js可以简写。如果文件夹下面是 index.js 那么可以直接不写,默认是直接选择index.js文件。
import { createStore } from 'redux'
import reducer from './reducer'
const store = createStore(reducer)
export default store