
Phisolophy
- React 如酒酿
- 复现 React 的轴心
- 反哺 DOM
Implement React from 0 to 1
- 0.前置准备
- 1.JSX 和 Virtual DOM
- 2.组件 和 state|props
- 3.生命周期
- 4.diff 算法
- 5.setState 优化
- 6.ref 实现
- 7.PureComponent 的实现
- 8.HOC 探索
- 9.onChange 事件以及受控组件
- 未完待续
- 测试之旅
与章节对应的代码可以在 更新日志 查阅。
可以在相应的 issue 里讨论相应章节内容。
Usage
yarn installyarn start
执行完上述命令后,会自动在浏览器 localhost:8080
上展示 hello,cpreact
。也可以在 沙盒 中使用
Practice
Contribution
If you want to contrubute this proj, you can read how to pr.
Thanks
Especially thank simple-react for the guidance function of this library. At the meantime, respect for preact and react