利用react redux react-router 构建一个SPA demo 包含一个登录页面 和世界杯球队展示页面
src components Login Teams index Germany Brazil Belguim China actions index.js (login logout) reducers loginReducer
App.js index.js
- create-react-app world-cup-demo 利用create-reacct-app 搭建项目
- npm run eject 弹出配置(不可逆)
- npm install --save react-router-dom 安装react-router-dom (当前最新版本为router4)
- npm install babel-plugin-transform-decorators-legacy 安装装载器插件
- npm start 启动webpack-dev-server
- 浏览器访问 localhost:3000
- xxxx
- Fork 本项目
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request