亚马逊练习2 源码
亚马逊练习2 #设置redux 1. npm i redux react-redux 2. create store.js in src and set up it like : import data from './data' import {createStore} from 'redux' const initialState = {}; const reducer = (state, action) => { return { products: data.products } } const store = createStore(reducer, initialState) export default store; 3. in index.js import {Provider} from
文件列表
amazon-practice-2nd-master.zip
(预估有个59文件)
amazon-practice-2nd-master
frontend
package.json
986B
package-lock.json
677KB
.env
24B
src
reducers
productReducers.js
1KB
cartReducers.js
716B
index.js
616B
暂无评论