From 0 to 1, we implement a minimal react, using the building blocks approach, starting from the simplest place step by step, so that you can really easily understand the underlying core principles of react. Each version is managed by git, and it is recommended that you start reading from the earliest git commit record.
从 0 到 1 实现一个最小的 react,采用搭积木的方式,从最简单的地方循序渐进,让你真正能轻松的读懂 react 的底层核心原理。每个版本采用 git 管理,建议你从最早的 git 提交记录开始阅读。
The code and folder are consistent with react19(React source code),In order to simplify the code and reduce the cost of understanding, make the following adjustments.
代码以及文件夹和 react19 的版本的基本一致,为了精简,减少理解成本,做如下调整:
- Remove typeScript type checking (去掉 typeScript 类型检验)
- Remove the required parameter check(去掉必要参数检验)
- Class component development is now basically abandoned. Remove the class component related content first, and add it later depending on the situation(去掉类组件逻辑)
- Initialize a webpack project from 0
- Implementing Virtual DOM (elment object)
- Implementing the creation of fiberRoot and rootFiber