facebook/react
By the numbers
Data collected on 2026-04-30 from the main branch at commit f4e0d4ed0c (latest at time of generation: [enableInfiniteRenderLoopDetection] Add a flag to force throwing (#36357)).
Size
The runtime side of the monorepo (packages/) is around 539,000 lines of source across roughly 1,870 source files (mostly Flow-typed JavaScript). The React Compiler workspace (compiler/packages/) adds another 69,000 lines of TypeScript on top.
xychart-beta horizontal title "Source files by package area" x-axis ["react-devtools-shared", "react-reconciler", "react-dom-bindings", "compiler", "react-server", "react-native-renderer", "shared", "react-server-dom-webpack", "react-dom", "react"] y-axis "Files" 0 --> 700 bar [620, 78, 145, 380, 60, 90, 110, 70, 80, 35]
(Counts include source, test, fixture, and golden files for the compiler — the compiler's snapshot fixtures dominate its file count.)
The biggest single source files are all in react-reconciler:
| File | Lines |
|---|---|
packages/react-reconciler/src/ReactFiberWorkLoop.js |
~5,100 |
packages/react-reconciler/src/ReactFiberCommitWork.js |
~5,000 |
packages/react-reconciler/src/ReactFiberHooks.js |
~4,500 |
packages/react-reconciler/src/ReactFiberBeginWork.js |
~4,500 |
packages/react-reconciler/src/ReactFiberCompleteWork.js |
~2,000 |
packages/react-reconciler/src/ReactChildFiber.js |
~1,900 |
packages/react-reconciler/src/ReactFiberApplyGesture.js |
~1,400 |
packages/react-reconciler/src/ReactFiberLane.js |
~1,200 |
These eight files together are about 5% of the runtime, and they account for the bulk of the work React does at runtime. See packages/react-reconciler for a tour.
Activity
Repository age: 12+ years (first commit May 29, 2013)
Total commits: ~21,500 on main
Distinct authors: ~1,970 over the project's lifetime
Commits in last 12 mo:~1,400
Commits in last 90 d: ~160
Commits in last 30 d: ~30The project has averaged a steady ~1,500 commits/year for several years, and growth is roughly linear, not exponential — the codebase has matured into incremental refinement rather than periodic rewrites.
Churn hotspots (last 90 days)
| File / area | Commits in last 90 d |
|---|---|
packages/react-devtools-shared/src/backend/fiber/renderer.js |
14 |
packages/shared/forks/ReactFeatureFlags.*.js (all variants combined) |
50+ |
packages/shared/ReactFeatureFlags.js |
10 |
compiler/fault-tolerance-overview.md |
10 |
packages/react-reconciler/src/ReactFiberWorkLoop.js |
7 |
compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts |
7 |
packages/react-devtools-shared/src/devtools/store.js |
6 |
The dominant editing pattern in any 90-day window is feature-flag flipping in packages/shared/forks/ReactFeatureFlags.*.js. This is by design: the team builds new features behind flags, ships them down release-channel-by-release-channel, and finally deletes the flag once it's everywhere. See reference/configuration for the channel layout.
DevTools is the second-most-active area, mostly because its renderer-walking code (packages/react-devtools-shared/src/backend/fiber/renderer.js) has to keep up with new fiber tags, hook implementations, and Activity/View Transition primitives.
Bot-attributed commits
Approximately 600 commits (≈ 3% of all commits) carry an explicit bot attribution — either a Co-authored-by: trailer pointing at a [bot] account, or a direct authoring [bot] email. The breakdown:
| Bot | Approximate count |
|---|---|
dependabot[bot] (direct authoring) |
~96 |
Various bots in trailers (copilot[bot], github-actions[bot], dependabot[bot]) |
~500 |
| Factory / Droid bot trailers | 0 (this codebase) |
This is a lower bound on AI-assisted work — inline IDE assistants leave no trace in git history.
Complexity
Some quick proxies for complexity, restricted to source files (excluding tests and fixtures):
- The
react-reconcilerpackage has the deepest call graph:ReactFiberWorkLoop.jsreaches roughly 30 sibling files inpackages/react-reconciler/src/, plus the host config, plusscheduler, plusshared. - The most-imported single file in the runtime is
packages/shared/ReactSymbols.js— every React-element-handling code path uses theREACT_ELEMENT_TYPEand friends defined there. - The most-imported file in the compiler is
compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts(the central HIR types).
Tests
The test runner (scripts/jest/jest-cli.js) ran the runtime through approximately:
- 5 release channels (
stable,experimental,www-modern,www-classic,next-major) on every push for the most heavily covered packages. - A second axis:
--buildmode, which runs the same tests against the produced bundle artifacts inbuild/rather than against source.
Internal test fixtures live next to the code they test under __tests__/ directories. The compiler additionally maintains thousands of golden-file fixtures under compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/.
TODO/FIXME density
Source files in packages/ have on the order of a few hundred TODO/FIXME/XXX comments. They are not concentrated in any one package — most are short, file-local notes about tightening a check, removing a workaround once a feature flag flips, or revisiting a corner of the API. There is no central tracker for them.
The numbers above are a snapshot, not a trend dashboard. For long-running history (eras, milestones, deprecations, rewrites), see lore.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.
Previous
Glossary
Next
Lore