Rebuilding React from scratch to finally understand what's inside.
Started as a follow-along to Build your own React and grew beyond "just adding types."
The goal wasn't to clone all of React – it was to get its core mechanics and design decisions right: fibers, lanes, scheduling, reconciliation – without the surface area of a production framework.
- Core API –
createElement/ JSX - Hooks –
useState - Reconciler
- Fiber tree, work loop –
performUnitOfWork,beginWork,completeUnitOfWork - Lanes-based priority –
markUpdateLaneFromFiberToRoot,childLanesbubbling - Fiber pooling –
getOrCreateWorkInProgressFiber - Keyed reconciliation
- Fiber tree, work loop –
- Renderer (host config) –
createDom,updateDom,commitRootFiber - Scheduler –
MessageChannel-backed work loop (performWorkUntilDeadline,scheduleWorkUntilDeadline), 5ms time-slice budget
Some test coverage for reconciler, hooks, DOM output.
- Effects (
useEffect) - memo
Structurally based on pomber/didact
