走进React的学习之路

时间:2023-03-09 23:41:20
走进React的学习之路
GIT: 代码管理。https://git-scm.com/book/zh/v2
ES6: http://www.infoq.com/cn/minibooks/ES6-in-Depth
Webpack: 编译打包,还有Common JS 规范。http://zhaoda.net/webpack-handbook/index.html Redux 中文文档:http://cn.redux.js.org/
路由routes:负责管理组件,

纯函数:确保输入和输出得到的东西是一样的
参考js
var arr=[1,2,3,4,5] arr.slice(0,3)
//[1, 2, 3]
arr //[1,2,3,4,5] arr.splice(0,3) //
[1, 2, 3] arr//[4, 5] redux的好处:一个状态stats和行为action==》改变成一个新的状态stats和行为Action 川川分享:
react-webpack文件夹是开发目录,在此目录下执行命令,假设你已经正确安装了 nodejs 一:参照教程搭建环境 https://github.com/newtriks/generator-react-webpack
npm install -g yo //安装 yeoman (可选)
npm install -g generator-react-webpack //安装生成器 (可选)
npm install //项目安装依赖 二:开发模式
1,npm start
2,自动打开浏览器查看运行效果
3,修改代码并等待浏览器自动刷新 三:发布模式
1,npm run dist
2,node minserver.js
3,手动打开浏览器访问 localhost:3000/index.html
4.如果要发布到其它服务器,拷贝dist就可以了 四:测试模式
1,npm run test 五:参考
http://reactjs.cn/ //react中文文档
http://react-guide.github.io/react-router-cn/ //react-router 中文文档
http://ant.design/ // 阿里专为后台管理系统制作的react组件