References — fw-11 Production Source Apprenticeship: React and Vue
Primary sources first. This module is the primary sources — by now you have written small versions of most of what you are about to read.
React
packages/overview — start by understanding the package boundaries; they encode the architecture.react-reconciler/src/ReactFiberWorkLoop.js— render/commit, interruption, lanesreact-reconciler/src/ReactFiberBeginWork.jsandReactFiberCompleteWork.js— the two halves of the work loopreact-reconciler/src/ReactFiberHooks.js— why hook order matters, in codescheduler/src/forks/Scheduler.js—MessageChannel, and the reasoning fe-01 (sibling project) measures- React RFCs · React 18 working group — design rationale in public
Vue
vuejs/corepackages —reactivity,runtime-core,runtime-dom,compiler-core,compiler-sfcreactivity/src/effect.ts— dependency trackingruntime-core/src/renderer.ts— patching, includingpatchKeyedChildren- Vue RFCs — especially the Composition API RFC and its long discussion thread
How to read a large codebase
- Start from a test, not from
index.js. A failing test gives you an entry point and a stopping condition. - Use Chromium Code Search habits on GitHub too: find the symbol, then find every call site.
git log -S"<symbol>"finds when something appeared and, via the commit message, usually why.- Keep a "why does this complexity exist?" notebook. Most surprising code is a bug fix; the commit tells you which.
Related modules
- Every prior
fw-*module — this is where you check your small versions against the real ones - bi-01 — Navigating Chromium — the same skill at a larger scale
When a claim here proves stale, record it in PROGRESS.md section 7.