基于 React Fiber 的实现
代码示例:https://codesandbox.io/s/github/cxphoe/mini-react
- vnode 实现(React.createElement 实现)
- fiber node 实现
- reconcile 调和
- 事件委托处理
- 实现的事件:
- onClick
- onInput
- onKeyDown
- onKeyPress
- onKeyUp
- onMouseOver
- onMouseOut
- 实现的事件:
- 类组件
- 生命周期
- setState
- 异步更新(批量合并处理,在生命周期内/在事件回调中)
- 同步更新 (异步回调中的处理)
- 函数组件
- hook
- useState
- useReducer
- useEffect
- hook
- 调度
yarn build