# facebook/react — codebase unpack

> Canonical page: https://codevetter.com/unpack/react

This is a deterministic Repo Unpack scan of facebook/react — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: 59aff3e18cb5b3a336c280bbfa57ec37999511b9 (2026-09-18)
- Last upstream commit: [compiler] Bail on use of arguments object (#37645)
- Generated by codevetter 1.12.0 on 2026-09-22
- 4000 files scanned · 24.3 MB

## Languages

- JavaScript: 3915 files
- Markdown: 2011 files
- TypeScript: 543 files
- JSON: 153 files
- Rust: 121 files
- CSS: 108 files
- HTML: 79 files
- YAML: 31 files

## Repository structure

- compiler/ — 1611 files
- packages/ — 1610 files
- fixtures/ — 505 files
- scripts/ — 195 files
- .github/ — 32 files
- flow-typed/ — 11 files
- .claude/ — 9 files
- .codesandbox/ — 1 files

Probable source entrypoint: `packages/` (inferred from the tree, not upstream docs)

## Package

- package.json: null — 80 declared dependencies

## Structural health signals

Average score 5.4/10 across 96 files; 92 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- 59aff3e18cb5 (2026-09-18) [compiler] Bail on use of arguments object (#37645)
- 71f725593739 (2026-09-17) [Flight] Server References for arbitrary object types (#37636)
- 2b19aecd0e91 (2026-09-16) [rust-compiler] Fix exponentiation to match js semantics (#37587)
- 98cec2ec262e (2026-09-16) [compiler] Add regression test for useEffectEvent reading a variable declared later (#37618)
- 2c68870bcc45 (2026-09-16) [test] Stop polyfilling `AbortController` (#37633)

## Overview

This is the facebook/react monorepo at commit 59aff3e — the React runtime (isomorphic `react`, the Fiber reconciler, the Fizz SSR server, the Flight/Server-Components client+server, DevTools, and the Scheduler) plus a largely independent `compiler/` sub-project holding the React Compiler in both TypeScript (`babel-plugin-react-compiler`) and an in-progress Rust port (12 `react_compiler_*` crates behind a napi bridge). It is a library-publishing repo, not an app: nearly every artifact is a Rollup-built npm bundle produced per *release channel* (stable / canary / experimental / www-classic / www-modern / xplat), with behaviour toggled by ~67 `enable*` feature flags that are fork-substituted at build time. What is distinctive is the fork/shim architecture — `ReactFiberConfig`, `ReactFeatureFlags`, `ReactFlightServerConfig` and friends are placeholder modules that *throw* unless Rollup or Jest swaps in a renderer-specific implementation — and a CI matrix that runs the same Jest suite 18 ways × 5 shards to prove every channel behaves.

## System map

There is no single entrypoint; the repo is a set of publishable packages under `packages/` (workspace glob in `package.json`) plus a nested Yarn/Cargo workspace under `compiler/`. The public runtime entrypoints are `packages/react/index.js` (isomorphic), `packages/react-dom/client.js` → `ReactDOMRoot.createRoot`, `packages/react-dom/server.node.js` → Fizz, and `packages/react-server-dom-*/server.*` → Flight. Everything is compiled by `scripts/rollup/build.js`, driven by a bundle table in `scripts/rollup/bundles.js` and a module-substitution table in `scripts/rollup/forks.js`; `build-all-release-channels.js` runs the whole thing once per channel and rewrites versions from `ReactVersions.js`. There is no database or persistent storage layer — the only 'storage' is the Fiber tree in memory, npm as the deployment target, and GitHub Actions artifacts. Tests never run `jest` directly; `scripts/jest/jest-cli.js` picks one of six configs and spawns Jest with channel/env/variant globals injected.
- `package.json` declares a Yarn-1 workspace over `packages/*` with `packageManager: yarn@1.22.22`, and blocks direct Jest invocation via `"jest": {"testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"}` — all testing must go through `yarn test` → `scripts/jest/jest-cli.js`. — [package.json#L119-L160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L119-L160) [scripts/jest/dont-run-jest-directly.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/dont-run-jest-directly.js)
- `ReactVersions.js` is the single source of truth for publishing: `ReactVersion = '19.3.0'`, a `stablePackages` map (react-reconciler 0.34.0, scheduler 0.28.0, react-refresh 0.19.0, eslint-plugin-react-hooks 7.1.1) and `experimentalPackages = ['react-markup']`; a package not listed there is never published. — [ReactVersions.js#L20-L58](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/ReactVersions.js#L20-L58)
- The client entrypoint is `createRoot(container, options)` in `packages/react-dom/src/client/ReactDOMRoot.js`, which calls `createContainer(..., ConcurrentRoot, ...)`, `markContainerAsRoot`, then `listenToAllSupportedEvents(rootContainerElement)` before returning a `ReactDOMRoot` wrapper whose `.render` delegates to `updateContainer`. — [packages/react-dom/src/client/ReactDOMRoot.js#L171-L261](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L171-L261) [packages/react-dom/src/client/ReactDOMRoot.js#L110-L136](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L110-L136)
- The reconciler's public surface is `packages/react-reconciler/src/ReactFiberReconciler.js` — `createContainer`, `updateContainer`, `updateContainerSync`, and `updateContainerImpl` which builds an update via `createUpdate(lane)` / `enqueueUpdate` and hands off to `scheduleUpdateOnFiber(root, rootFiber, lane)`. — [packages/react-reconciler/src/ReactFiberReconciler.js#L235-L250](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberReconciler.js#L235-L250) [packages/react-reconciler/src/ReactFiberReconciler.js#L353-L455](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberReconciler.js#L353-L455)
- The renderer boundary is the `ReactFiberConfig` shim: `packages/react-reconciler/src/ReactFiberConfig.js` contains only `throw new Error('This module must be shimmed by a specific renderer.')` — Rollup (`scripts/rollup/forks.js`) and Jest (`scripts/jest/setupHostConfigs.js`) both substitute a real host config per renderer. — [packages/react-reconciler/src/ReactFiberConfig.js#L10-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberConfig.js#L10-L22) [scripts/rollup/forks.js#L235-L268](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/forks.js#L235-L268) [scripts/jest/setupHostConfigs.js#L137-L217](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/setupHostConfigs.js#L137-L217)
- `scripts/shared/inlinedHostConfigs.js` enumerates ~20 renderer targets by `shortName` (`dom-browser`, `dom-node`, `dom-edge-webpack`, `dom-node-turbopack`, `dom-node-parcel`, `dom-bun`, `fabric`, `markup`, `dom-fb`, …), each with an `entryPoints` list — this table is the authoritative list of runtime boundaries. — [scripts/shared/inlinedHostConfigs.js#L11-L700](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/shared/inlinedHostConfigs.js#L11-L700)
- Cooperative scheduling lives in `packages/scheduler/src/forks/Scheduler.js`: `unstable_scheduleCallback` pushes into a min-heap, `workLoop` drains it, and `shouldYieldToHost` yields once `timeElapsed >= frameInterval` (default `frameYieldMs`, tunable via an fps setter); the host callback is scheduled via `setImmediate` when available, else `MessageChannel` (chosen to dodge the 4 ms `setTimeout` clamp), else `setTimeout`. — [packages/scheduler/src/forks/Scheduler.js#L100-L110](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/Scheduler.js#L100-L110) [packages/scheduler/src/forks/Scheduler.js#L193-L200](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/Scheduler.js#L193-L200) [packages/scheduler/src/forks/Scheduler.js#L456-L560](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/Scheduler.js#L456-L560)
- Builds are orchestrated by `scripts/rollup/build.js` (`buildEverything` → `createBundle` per bundle × bundleType, with Babel, Google Closure Compiler for prod bundles, and `rollup-plugin-prettier` for FB/dev output) over the ~20 `bundleTypes` declared in `scripts/rollup/bundles.js` (NODE_DEV/PROD/PROFILING, ESM_*, BUN_*, FB_WWW_*, RN_OSS_*, RN_FB_*, BROWSER_SCRIPT, CJS_DTS/ESM_DTS). — [scripts/rollup/build.js#L639-L917](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build.js#L639-L917) [scripts/rollup/bundles.js#L10-L55](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/bundles.js#L10-L55)
- `scripts/rollup/build-all-release-channels.js` shells out to the build once per channel via `spawnSync`, then `processStable(buildDir)` / `processExperimental(buildDir)` rewrite package versions using the short SHA from `git rev-parse HEAD`, merging the experimental tree into the stable one. — [scripts/rollup/build-all-release-channels.js#L24-L158](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build-all-release-channels.js#L24-L158) [scripts/rollup/build-all-release-channels.js#L179-L415](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build-all-release-channels.js#L179-L415)
- The compiler is a second workspace: `compiler/Cargo.toml` defines a Rust workspace over `crates/*` plus `packages/babel-plugin-react-compiler-rust/native`, pinned to edition 2024 / rust-version 1.85, version `0.0.1-oidc.0`, with a `[profile.release]` of fat LTO + 1 codegen unit + strip (documented as shrinking the shipped `index.node` from 11.2 MB to 7.2 MB). — [compiler/Cargo.toml#L1-L33](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/Cargo.toml#L1-L33)
- The Rust compiler is reached from JS through napi: `native/src/lib.rs` exposes `#[napi] pub fn compile(ast_json, scope_json, options_json) -> String`, spawning a dedicated 64 MB-stack thread and catching panics; `src/bridge.ts` loads it with `require('../native')` and passes JSON. — [compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L18-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L18-L60) [compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L60-L175](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L60-L175)
- External integrations are narrow and mostly tooling-side: npm registry (`scripts/release/publish.js`, `scripts/release/ci-npmrc`), Discord webhooks in four notify workflows, Vercel for the compiler playground (`compiler/apps/playground/vercel.json`), and Algolia's `beta-react` index queried by the React MCP server. — [scripts/release/publish.js#L1-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/publish.js#L1-L60) [.github/workflows/runtime_discord_notify.yml#L45](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_discord_notify.yml#L45) [compiler/packages/react-mcp-server/src/utils/algolia.ts#L12-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/utils/algolia.ts#L12-L22)
- Deployment shape is 'publish to npm from CI': `compiler_prereleases.yml`, `compiler_prereleases_nightly.yml` and `compiler_prereleases_manual.yml` inject `NPM_TOKEN` into the job env, while `scripts/release/publish.js` notes that npm `whoami`/ownership checks were removed in favour of OIDC trusted publishing. — [.github/workflows/compiler_prereleases.yml#L29-L36](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_prereleases.yml#L29-L36) [scripts/release/publish.js#L50-L56](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/publish.js#L50-L56) [scripts/release/ci-npmrc](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/ci-npmrc)
- Repo-level agent conventions are codified in `CLAUDE.md` plus `.claude/skills/*/SKILL.md` — `/verify` runs `yarn prettier` → `yarn linc` → `/flow` + `/test` + `/test www` in parallel, and explicitly instructs that builds are CI's job and should not be run locally. — [CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/CLAUDE.md) [.claude/skills/verify/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/verify/SKILL.md) [.claude/instructions.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/instructions.md)

## Feature catalog

User-facing surface is API surface, not screens. `packages/react/src/ReactClient.js` is the canonical export list for the isomorphic package; `react-dom` fans out to client, server (Node/Edge/Browser/Bun), static prerender and test-utils entrypoints; `react-server-dom-{webpack,turbopack,parcel,esm,unbundled,fb}` each ship a bundler-specific Flight client+server pair. Tooling packages are first-class features too: `eslint-plugin-react-hooks` (now also re-exporting compiler-derived rules), `react-refresh` (Fast Refresh Babel plugin + runtime), DevTools in five packaging flavours, and two MCP servers. Behaviour is further gated by ~67 `enable*` flags in `packages/shared/ReactFeatureFlags.js`, inspectable via `yarn flags`.
- The isomorphic `react` package exports the full modern surface including `use`, `cache`, `cacheSignal`, `Activity`, `ViewTransition`, `addTransitionType`, `unstable_SuspenseList`, `unstable_TracingMarker`, and `__COMPILER_RUNTIME` — enumerated in `packages/react/index.js` and implemented in `ReactClient.js`. — [packages/react/index.js#L27-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/index.js#L27-L60) [packages/react/src/ReactClient.js#L25-L80](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactClient.js#L25-L80)
- Hooks are exported from `packages/react/src/ReactHooks.js` and include the newer `useOptimistic`, `useActionState`, `useEffectEvent`, `useSyncExternalStore`, `useDeferredValue`, `useCacheRefresh` and `use`. — [packages/react/src/ReactClient.js#L38-L59](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactClient.js#L38-L59) [packages/react/src/ReactHooks.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactHooks.js)
- `react-dom` ships eleven distinct entrypoints — `client.js`, `server.js`/`server.node.js`/`server.edge.js`/`server.browser.js`/`server.bun.js`, `static.js`/`static.node.js`/`static.edge.js`/`static.browser.js`, `profiling.js`, `test-utils.js`, `unstable_testing.js` and `unstable_server-external-runtime.js`. — [packages/react-dom/client.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/client.js) [packages/react-dom/server.node.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/server.node.js) [packages/react-dom/static.edge.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/static.edge.js) [packages/react-dom/unstable_server-external-runtime.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/unstable_server-external-runtime.js)
- Streaming SSR is `renderToPipeableStream` in `packages/react-dom/src/server/ReactDOMFizzServerNode.js`, which builds a request via `createRequestImpl` → `createRequest`, kicks off `startWork(request)`, and exposes `pipe(destination)` that calls `startFlowing(request, destination)`. — [packages/react-dom/src/server/ReactDOMFizzServerNode.js#L104-L151](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/server/ReactDOMFizzServerNode.js#L104-L151) [packages/react-server/src/ReactFizzServer.js#L601-L620](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L601-L620) [packages/react-server/src/ReactFizzServer.js#L6370-L6470](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L6370-L6470)
- Server Actions are a shipped feature: `decodeAction(body, serverManifest)` scans FormData for `$ACTION_REF_*` / `$ACTION_ID_*` keys, resolves the reference through `loadServerReference`, and returns the action pre-bound to the remaining FormData; `decodeFormState` handles `$ACTION_KEY` for `useActionState`. — [packages/react-server/src/ReactFlightActionServer.js#L107-L175](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L107-L175) [packages/react-server-dom-webpack/src/server/ReactFlightDOMServerNode.js#L540-L758](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server-dom-webpack/src/server/ReactFlightDOMServerNode.js#L540-L758)
- Flight (RSC) supports multiple request body shapes on the server: `decodeReply`, `decodeReplyFromBusboy` (multipart uploads) and `decodeReplyFromAsyncIterable`, all exported from `ReactFlightDOMServerNode.js`. — [packages/react-server-dom-webpack/src/server/ReactFlightDOMServerNode.js#L540-L758](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server-dom-webpack/src/server/ReactFlightDOMServerNode.js#L540-L758)
- Taint APIs `taintUniqueValue` and `taintObjectReference` guard against leaking server secrets to the client, backed by `TaintRegistryObjects` (WeakMap), `TaintRegistryValues` (refcounted Map) and a `FinalizationRegistry` cleanup hook; gated by `enableTaint = __EXPERIMENTAL__`. — [packages/react/src/ReactTaint.js#L28-L62](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactTaint.js#L28-L62) [packages/react/src/ReactTaintRegistry.js#L17-L28](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactTaintRegistry.js#L17-L28) [packages/shared/ReactFeatureFlags.js#L94](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js#L94)
- `eslint-plugin-react-hooks` v7 ships `rules-of-hooks` and `exhaustive-deps` plus a set of compiler-derived rules merged in from `shared/ReactCompiler`, with `recommended` and `recommendedLatest` flat-config presets and a deprecated-rule shim for `component-hook-factories`. — [packages/eslint-plugin-react-hooks/src/index.ts#L9-L80](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/eslint-plugin-react-hooks/src/index.ts#L9-L80) [packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts) [packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts)
- Fast Refresh is two artifacts: `ReactFreshBabelPlugin.js` (build-time instrumentation) and `ReactFreshRuntime.js` (runtime registry / signature checking), published as `react-refresh@0.19.0`. — [packages/react-refresh/src/ReactFreshBabelPlugin.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-refresh/src/ReactFreshBabelPlugin.js) [packages/react-refresh/src/ReactFreshRuntime.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-refresh/src/ReactFreshRuntime.js) [ReactVersions.js#L52](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/ReactVersions.js#L52)
- DevTools ships in five packaging flavours — `react-devtools` (standalone), `-core`, `-extensions` (browser extension), `-inline`, `-fusebox` (React Native / Chrome DevTools frontend) — all sharing `react-devtools-shared`, plus `react-devtools-shell` for local development. — [packages/react-devtools-extensions/src/panel.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-extensions/src/panel.js) [packages/react-devtools-shared/src/bridge.js#L317-L347](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L317-L347) [packages/react-devtools-shell](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shell)
- `react-devtools-cdt-mcp` is a browser library that registers React inspection and profiling tools with `chrome-devtools-mcp`, published from its own workflow. — [packages/react-devtools-cdt-mcp/package.json#L1-L25](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-cdt-mcp/package.json#L1-L25) [.github/workflows/devtools_cdt_mcp_publish.yml](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/devtools_cdt_mcp_publish.yml)
- A second MCP server lives in the compiler: `compiler/packages/react-mcp-server` registers tools including `query-react-dev-docs` (Algolia-backed react.dev search) and a runtime-performance tool driven by headless Puppeteer. — [compiler/packages/react-mcp-server/src/index.ts#L33-L70](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/index.ts#L33-L70) [compiler/packages/react-mcp-server/src/tools/runtimePerf.ts#L2-L95](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/tools/runtimePerf.ts#L2-L95)
- The compiler playground is a real deployed Next.js 15.5.9 + Tailwind + Monaco app with a `dev` script that concurrently watches the compiler, the runtime and Next, and a Playwright `test` script. — [compiler/apps/playground/package.json#L5-L45](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/apps/playground/package.json#L5-L45) [compiler/apps/playground/tailwind.config.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/apps/playground/tailwind.config.js) [compiler/apps/playground/playwright.config.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/apps/playground/playwright.config.js)
- CLI-style developer commands are exposed as npm scripts: `yarn test` (channel-aware), `yarn flow`, `yarn lint`/`yarn linc`, `yarn flags`, `yarn extract-errors`, `yarn download-build`, `yarn generate-changelog`, `yarn build-for-devtools`. — [package.json#L122-L160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L122-L160)
- Behaviour is switchable at build time through ~67 `enable*` constants in `packages/shared/ReactFeatureFlags.js` (e.g. `enableViewTransition`, `enableGestureTransition`, `enableDefaultTransitionIndicator`, `enableFizzBlockingRender`, `enableOptimisticKey`), many tied to `__EXPERIMENTAL__`. — [packages/shared/ReactFeatureFlags.js#L26-L124](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js#L26-L124) [scripts/flags/flags.js#L1-L40](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/flags/flags.js#L1-L40)

## Data flow

On the client, input enters through DOM events (delegated at the root by `listenToAllSupportedEvents`) or imperative `root.render`, both of which funnel into `scheduleUpdateOnFiber(root, fiber, lane)`. State lives on the Fiber tree hanging off `FiberRoot`; the `lane` bitmask on `ReactFiberLane.js` is the priority currency that decides whether work is flushed synchronously, in a microtask, or via a Scheduler task. Output boundaries are the host config (`ReactFiberConfig`, substituted per renderer) and, for SSR/RSC, the stream `Destination` in Fizz/Flight. Cross-module state is deliberately routed through a single mutable singleton, `ReactSharedInternals` (`.H` = current hooks dispatcher, `.T` = current transition, `.A` = async dispatcher), which is itself a forked module so client and server get different instances.
- All client updates converge on `scheduleUpdateOnFiber`, which marks the root (`markRootUpdated(root, lane)`), merges interleaved/render-phase lanes, and calls `ensureRootIsScheduled(root)`; sync updates on legacy roots additionally trigger `flushSyncWorkOnLegacyRootsOnly()` immediately. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L987-L1110](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L987-L1110)
- `ensureRootIsScheduled` does not schedule work directly — it appends the root to an intrusive linked list (`firstScheduledRoot`/`lastScheduledRoot` via `root.next`), sets `mightHavePendingSyncWork = true`, and defers to a microtask that runs `processRootScheduleInMicrotask` → `scheduleTaskForRootDuringMicrotask`. — [packages/react-reconciler/src/ReactFiberRootScheduler.js#L116-L170](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L116-L170) [packages/react-reconciler/src/ReactFiberRootScheduler.js#L259-L513](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L259-L513)
- Priority is encoded as a 31-bit lane bitmask (`TotalLanes = 31`) with named lanes `SyncLane`, `InputContinuousLane`, `DefaultLane`, transition lanes, retry lanes, `IdleLane`, `OffscreenLane` and `DeferredLane`; `requestUpdateLane(fiber)` picks the lane for each update. — [packages/react-reconciler/src/ReactFiberLane.js#L41-L110](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberLane.js#L41-L110) [packages/react-reconciler/src/ReactFiberWorkLoop.js#L812-L884](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L812-L884)
- `performWorkOnRoot` decides between `renderRootConcurrent` and `renderRootSync` from `shouldTimeSlice`, which is false for blocking lanes, expired lanes, or `forceSync` — but forced true when `checkIfRootIsPrerendering(root, lanes)` so prerendering never blocks the main thread. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L1163-L1182](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1163-L1182)
- External-store consistency is re-validated after a concurrent render: if `isRenderConsistentWithExternalStores(finishedWork)` fails, `performWorkOnRoot` discards the result and re-runs `renderRootSync(root, lanes, false)` to block further mutation. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L1218-L1245](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1218-L1245)
- Hook state is read and written through a swappable dispatcher on the shared-internals singleton: `renderWithHooks` assigns `ReactSharedInternals.H` to `HooksDispatcherOnMount` or `HooksDispatcherOnUpdate` (DEV variants included) and resets it to `ContextOnlyDispatcher` when the component finishes. — [packages/react-reconciler/src/ReactFiberHooks.js#L505-L570](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberHooks.js#L505-L570) [packages/react-reconciler/src/ReactFiberHooks.js#L655-L665](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberHooks.js#L655-L665) [packages/shared/ReactSharedInternals.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactSharedInternals.js)
- `root.render(children)` writes nothing directly — it calls `updateContainer(children, root, null, null)`, which becomes an update object on the host-root fiber's update queue via `createUpdate(lane)` + `enqueueUpdate(rootFiber, update, lane)`. — [packages/react-dom/src/client/ReactDOMRoot.js#L110-L136](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L110-L136) [packages/react-reconciler/src/ReactFiberReconciler.js#L353-L455](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberReconciler.js#L353-L455)
- DOM events are the other input boundary and are delegated once per root: `createRoot` and `hydrateRoot` each call `listenToAllSupportedEvents(container)` from `react-dom-bindings/src/events/DOMPluginEventSystem`, so per-node listeners are not attached. — [packages/react-dom/src/client/ReactDOMRoot.js#L84](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L84) [packages/react-dom/src/client/ReactDOMRoot.js#L258](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L258) [packages/react-dom/src/client/ReactDOMRoot.js#L357](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L357)
- On the server, Fizz's data flow is request-scoped: `createRequest(...)` builds a `Request`, `startWork(request)` renders tasks (`retryTask`, `renderNode`, `renderNodeDestructive`), and `startFlowing(request, destination)` drains completed segments through `flushCompletedQueues` into the stream. — [packages/react-server/src/ReactFizzServer.js#L601-L620](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L601-L620) [packages/react-server/src/ReactFizzServer.js#L4312-L5340](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L4312-L5340) [packages/react-server/src/ReactFizzServer.js#L6175-L6470](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L6175-L6470)
- Server-Action input crosses a trust boundary as untyped `FormData`: `decodeAction` copies every non-`$ACTION_` field into a fresh `FormData`, decodes bound args by replaying them through `createResponse`/`getRoot` in `decodeBoundActionMetaData`, and binds the result — so client-supplied bytes drive `resolveServerReference(bundlerConfig, id)`. — [packages/react-server/src/ReactFlightActionServer.js#L46-L160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L46-L160)
- `decodeBoundActionMetaData` accepts an `arraySizeLimit` parameter threaded into `createResponse`, indicating the Flight reply parser has an explicit bound on attacker-controlled array sizes. — [packages/react-server/src/ReactFlightActionServer.js#L76-L92](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L76-L92)
- DevTools data flows over a batched message bus: `Bridge` wraps a `Wall`, queues events and flushes them on a `BATCH_DURATION` timer, sending typed `BackendEvents` (`overrideProps`, `overrideHookState`, `overrideState`, `overrideContext`) from frontend to backend. — [packages/react-devtools-shared/src/bridge.js#L207-L230](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L207-L230) [packages/react-devtools-shared/src/bridge.js#L317-L441](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L317-L441) [packages/react-devtools-shared/src/bridge.js#L485-L525](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L485-L525)
- The renderer registers itself with the page-global `__REACT_DEVTOOLS_GLOBAL_HOOK__` (installed by `installHook(target)` with `Object.defineProperty`, and explicitly documented as a de-facto public API) via `renderers.set(id, renderer)` — that global is the whole runtime↔DevTools data channel. — [packages/react-devtools-shared/src/hook.js#L3-L10](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L3-L10) [packages/react-devtools-shared/src/hook.js#L59-L72](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L59-L72) [packages/react-devtools-shared/src/hook.js#L212](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L212) [packages/react-devtools-shared/src/hook.js#L659](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L659)
- In the Rust compiler, data flows as JSON across the FFI boundary: Babel serialises the AST + scope info + options, `compile()` deserialises with `serde_json::Deserializer::disable_recursion_limit()` to survive deeply nested ASTs, and returns a JSON `CompileResult`. — [compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L11-L70](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L11-L70) [compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L110-L175](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L110-L175)
- The Rust HIR replaces JS shared-object references with arena indices: `identifiers`/`scopes`/`functions`/`types` vectors on `Environment`, addressed by `Copy` newtype IDs (`IdentifierId`, `ScopeId`, `FunctionId`, `TypeId`), with `HirFunction` deliberately not owning `env`. — [compiler/docs/rust-port/rust-port-architecture.md#L5-L70](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/docs/rust-port/rust-port-architecture.md#L5-L70)

## Behavior traces

Three flows are worth walking: (1) client startup/first paint, from `createRoot` through the microtask scheduler into render and commit; (2) the compile flow, where Babel hands a function to either the TS `Pipeline.ts` or the Rust `pipeline.rs`; (3) the release flow, where a commit becomes npm artifacts. The commit phase in particular is a fixed three-pass sequence with `root.current = finishedWork` as the atomic swap point between mutation and layout, and passive effects flushed later. Each trace below names the functions in call order with line anchors.
- Startup trace: `createRoot(container, options)` → validate via `isValidContainer` → `createContainer(container, ConcurrentRoot, …, onUncaughtError, onCaughtError, onRecoverableError)` → `markContainerAsRoot(root.current, container)` → `listenToAllSupportedEvents(rootContainerElement)` → `new ReactDOMRoot(root)`. — [packages/react-dom/src/client/ReactDOMRoot.js#L171-L261](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L171-L261)
- First render trace: `root.render(children)` → `updateContainer` → `updateContainerImpl` → `requestUpdateLane(current)` → `createUpdate(lane)` → `enqueueUpdate(rootFiber, update, lane)` → `scheduleUpdateOnFiber(root, rootFiber, lane)`. — [packages/react-dom/src/client/ReactDOMRoot.js#L110-L136](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/client/ReactDOMRoot.js#L110-L136) [packages/react-reconciler/src/ReactFiberReconciler.js#L341-L455](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberReconciler.js#L341-L455)
- Scheduling trace: `scheduleUpdateOnFiber` → `markRootUpdated(root, lane)` → `ensureRootIsScheduled(root)` → `ensureScheduleIsScheduled()` → `scheduleImmediateRootScheduleTask()` → (microtask) `processRootScheduleInMicrotask` → `scheduleTaskForRootDuringMicrotask` → `Scheduler_scheduleCallback(priorityLevel, performWorkOnRootViaSchedulerTask)`. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L1091](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1091) [packages/react-reconciler/src/ReactFiberRootScheduler.js#L116-L200](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L116-L200) [packages/react-reconciler/src/ReactFiberRootScheduler.js#L259-L513](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L259-L513) [packages/react-reconciler/src/ReactFiberRootScheduler.js#L626-L695](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L626-L695)
- Render trace: `performWorkOnRoot(root, lanes, forceSync)` computes `shouldTimeSlice`, dispatches to `renderRootConcurrent` (line 2779) or `renderRootSync` (line 2623), then loops on the `RootExitStatus` — handling `RootInProgress` (yield, `startYieldTimer`), store inconsistency (re-render sync), and `RootErrored` (`getLanesToRetrySynchronouslyOnError` → `recoverFromConcurrentError`). — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L1137-L1280](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1137-L1280) [packages/react-reconciler/src/ReactFiberWorkLoop.js#L2623-L2790](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2623-L2790)
- Component render trace: for each function component the reconciler calls `renderWithHooks`, which installs the mount-or-update dispatcher on `ReactSharedInternals.H`, invokes the component, then restores `ContextOnlyDispatcher`; `bailoutHooks` is the memoized fast path. — [packages/react-reconciler/src/ReactFiberHooks.js#L505-L570](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberHooks.js#L505-L570) [packages/react-reconciler/src/ReactFiberHooks.js#L655-L665](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberHooks.js#L655-L665) [packages/react-reconciler/src/ReactFiberHooks.js#L908-L945](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberHooks.js#L908-L945)
- Commit trace: `commitRoot` (line 3725) → `commitBeforeMutationEffects(root, finishedWork, lanes)` → `commitMutationEffects(root, finishedWork, lanes)` → `root.current = finishedWork` (the tree swap, line 4051) → `commitLayoutEffects(finishedWork, root, lanes)` → `flushSpawnedWork()`; passive effects run later via `flushPendingEffects` → `commitPassiveMountEffects`. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L3725-L4160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L3725-L4160) [packages/react-reconciler/src/ReactFiberWorkLoop.js#L4655-L4800](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L4655-L4800)
- Yield trace: inside a Scheduler task, `workLoop(initialTime)` drains the min-heap and stops when `shouldYieldToHost()` returns true (elapsed ≥ `frameInterval`); the continuation is re-armed by `schedulePerformWorkUntilDeadline()` through `setImmediate`/`MessageChannel`/`setTimeout`. — [packages/scheduler/src/forks/Scheduler.js#L193-L200](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/Scheduler.js#L193-L200) [packages/scheduler/src/forks/Scheduler.js#L456-L570](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/Scheduler.js#L456-L570)
- SSR trace: `renderToPipeableStream(children, options)` → `createRequestImpl` → `createRequest(...)` → `startWork(request)` (line 6370) → tasks retried through `retryTask`/`renderNode` → consumer calls `pipe(destination)` → `startFlowing(request, destination)` (line 6464) → `flushCompletedQueues` (line 6175); `abort(request, reason)` is the cancellation path (line 6557). — [packages/react-dom/src/server/ReactDOMFizzServerNode.js#L104-L160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/server/ReactDOMFizzServerNode.js#L104-L160) [packages/react-server/src/ReactFizzServer.js#L5327-L6560](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFizzServer.js#L5327-L6560)
- Server Action trace: HTTP POST FormData → `decodeAction(body, serverManifest)` → detect `$ACTION_REF_*` or `$ACTION_ID_*` → `decodeBoundActionMetaData` (for bound args) → `loadServerReference` → `resolveServerReference(bundlerConfig, id)` → `preloadModule` → `requireModule` → `bindArgs(fn, args)` → returned action `fn.bind(null, formData)`. — [packages/react-server/src/ReactFlightActionServer.js#L40-L162](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L40-L162)
- TS compile trace: `compileFn` builds `Environment` from `findContextIdentifiers(func)`, then runs `lower(func, env)` → `PruneMaybeThrows` → `ValidateContextVariableLValues` → `MergeConsecutiveBlocks` → `SSA` → `EliminateRedundantPhi` → `ConstantPropagation` → `InferTypes` → `AnalyseFunctions` → `InferMutationAliasingEffects` → `DeadCodeElimination` → `InferMutationAliasingRanges` → `InferReactivePlaces` → `buildReactiveFunction` → `renameVariables`, logging each step through the `log(value)` callback. — [compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L540](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L540)
- Rust compile trace mirrors it: `compile_fn` → `react_compiler_lowering::lower` → `validate_context_variable_lvalues` → `validate_use_memo` → `enter_ssa` → `eliminate_redundant_phi` → `infer_types` → `analyse_functions` → `infer_mutation_aliasing_effects` → `infer_mutation_aliasing_ranges` → validations → `infer_reactive_places` → `infer_reactive_scope_variables` → scope alignment passes. — [compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640)
- The compiler is fault-tolerant rather than fail-fast: passes call `env.recordError(diagnostic)`, validation passes are wrapped in `env.tryRecord(() => pass(hir))`, and errors are aggregated at the end via `env.hasErrors()` / `env.aggregateErrors()` — `CompilerError.invariant()` is the only category that always throws. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L200](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L200)
- Rust bailout trace: `prefilter.ts` walks the Babel AST first and only forwards functions that are component/hook declarations or carry an opt-in directive, so the napi boundary is never crossed for ordinary functions. — [compiler/packages/babel-plugin-react-compiler-rust/src/prefilter.ts#L28-L155](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/src/prefilter.ts#L28-L155) [compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L60-L130](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/src/bridge.ts#L60-L130)
- Release trace: `yarn build` → `prebuild` links the compiler via `scripts/react-compiler/link-compiler.sh` → `build-all-release-channels.js` → `buildForChannel(channel)` spawns `scripts/rollup/build.js` → `processStable`/`processExperimental` rewrite versions from `ReactVersions.js` + short SHA → `scripts/release/publish.js` validates tags and publishes with OIDC. — [package.json#L122-L124](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L122-L124) [scripts/rollup/build-all-release-channels.js#L24-L180](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build-all-release-channels.js#L24-L180) [scripts/release/publish.js#L15-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/publish.js#L15-L60)
- Error-minification trace: prod bundles emit `/*! <expected-error-format>"…"</expected-error-format>` markers; `yarn extract-errors` greps the `build` dir with `execSync('git --no-pager grep …')`, assigns the next free numeric code, and appends to `scripts/error-codes/codes.json` (~66 KB of registered messages). — [scripts/error-codes/extract-errors.js#L1-L55](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/error-codes/extract-errors.js#L1-L55) [scripts/error-codes/codes.json](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/error-codes/codes.json)

## Testing signals

Jest 30 is the runtime test framework, with 544 test files under `packages/**/__tests__`, and it is deliberately unusable directly — `package.json`'s `testRegex` points at `dont-run-jest-directly.js`, forcing everything through `scripts/jest/jest-cli.js`. That CLI selects one of six configs (source, source-www, source-xplat, source-persistent, build, build-devtools) and injects `__DEV__`, `__EXPERIMENTAL__` and `__VARIANT__` globals; individual tests opt in/out of behaviour with `// @gate <flag>` pragmas resolved by `scripts/jest/TestFlags.js`. The compiler uses a different harness entirely: `yarn snap` over ~1,543 fixture files with `.expect.md` snapshots, plus Playwright e2e for the playground and the flight fixture. CI runs the runtime suite as an 18-config × 5-shard matrix; the Rust port has its own workflow gating on `cargo check`, `cargo build`, two shell test scripts and `yarn snap --rust`.
- Jest is pinned at `^30.4.1` (`jest`, `jest-cli`, `jest-environment-jsdom`, `babel-jest`) with `jest-silent-reporter` and `jest-snapshot-serializer-raw` for output control. — [package.json#L86-L95](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L86-L95)
- There are 544 test files under `packages/**/__tests__/**/*.js`, spread across the runtime, DevTools shared, scheduler and shared packages. — [packages/react-reconciler/src/__tests__](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/__tests__) [packages/react-dom/src/__tests__](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-dom/src/__tests__) [packages/scheduler/src/__tests__](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/__tests__)
- `scripts/jest/jest-cli.js` is the only supported entry: it exposes `--project {default,devtools}`, `--releaseChannel {experimental,stable,www-classic,www-modern,xplat}`, `--env`, `--prod`/`--dev`, `--variant`, `--build`, `--persistent`, `--ci`, `--reactVersion` and `--sourceMaps`, then spawns Jest with the matching config file. — [scripts/jest/jest-cli.js#L10-L120](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/jest-cli.js#L10-L120)
- Six Jest configs cover the test surfaces: `config.source.js`, `config.source-www.js`, `config.source-xplat.js`, `config.source-persistent.js`, `config.build.js` and `config.build-devtools.js` — so the same specs are exercised against source and against built bundles. — [scripts/jest/config.source.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/config.source.js) [scripts/jest/config.build.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/config.build.js) [scripts/jest/config.build-devtools.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/config.build-devtools.js) [scripts/jest/jest-cli.js#L10-L18](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/jest-cli.js#L10-L18)
- `@gate` pragmas let a test declare its preconditions; `scripts/jest/TestFlags.js` resolves them against `shared/ReactFeatureFlags` plus environment flags `__DEV__`, `build`, `experimental`, `stable`, `variant`, `persistent`, and the deliberate escape hatches `FIXME: false` / `TODO: false` for known-broken tests. — [scripts/jest/TestFlags.js#L1-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/TestFlags.js#L1-L60)
- `scripts/jest/setupHostConfigs.js` rewires module resolution so each test file resolves `react-reconciler/src/ReactFiberConfig` to the right renderer's host config, iterating over `inlinedHostConfigs` — without it every reconciler test would hit the throwing shim. — [scripts/jest/setupHostConfigs.js#L1-L220](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/setupHostConfigs.js#L1-L220) [packages/react-reconciler/src/ReactFiberConfig.js#L10-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberConfig.js#L10-L22)
- `packages/internal-test-utils` supplies the shared test vocabulary — `internalAct.js`, `ReactInternalTestUtils.js`, `consoleMock.js`, `shouldIgnoreConsoleError.js`/`shouldIgnoreConsoleWarn.js`, and `simulateBrowserEventDispatch.js` — and is itself tested. — [packages/internal-test-utils/internalAct.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/internal-test-utils/internalAct.js) [packages/internal-test-utils/ReactInternalTestUtils.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/internal-test-utils/ReactInternalTestUtils.js) [packages/internal-test-utils/consoleMock.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/internal-test-utils/consoleMock.js)
- The runtime CI matrix in `runtime_build_and_test.yml` runs 18 parameter sets (stable/experimental/www-classic/www-modern/xplat × development/production × variant true/false, plus two persistent configs) crossed with 5 shards, i.e. 90 parallel `yarn test` jobs. — [.github/workflows/runtime_build_and_test.yml#L217-L272](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L217-L272)
- CI also gates on non-test checks as separate jobs: `flow` (sharded by discovered inline configs), `check_generated_fizz_runtime`, `flags`, and `test-linter` for `eslint-plugin-react-hooks`. — [.github/workflows/runtime_build_and_test.yml#L118-L215](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L118-L215) [.github/workflows/runtime_build_and_test.yml#L276-L285](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L276-L285)
- There is a dedicated fuzz workflow (`runtime_fuzz_tests.yml`) separate from the main suite, so fuzzing is not part of the per-PR signal. — [.github/workflows/runtime_fuzz_tests.yml#L1-L35](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_fuzz_tests.yml#L1-L35)
- The compiler's test corpus is fixture-driven: ~1,543 `.js` fixtures under `babel-plugin-react-compiler/src/__tests__/fixtures`, each paired with a `.expect.md`, run via `yarn snap` (`-p <pattern>`, `-d` debug, `-u` update) as documented in `compiler/CLAUDE.md`. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/packages/snap](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/snap)
- Fixture naming encodes expected failure modes: `error.todo-*.js` means an unsupported feature that correctly bails with a Todo error, `error.bug-*.js` means a known bug producing the wrong error — so some fixtures are assertions about known gaps, not passing behaviour. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md)
- The Rust port has its own CI gate: `compiler_rust.yml` runs `cargo check`, `cargo build`, `bash scripts/test-babel-ast.sh`, `bash scripts/test-rust-port.sh`, then builds `snap` and runs `yarn snap --rust` — i.e. the Rust implementation is validated against the same fixture snapshots as the TS one. — [.github/workflows/compiler_rust.yml#L24-L68](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_rust.yml#L24-L68)
- Only 14 TypeScript unit-test files exist across the whole `compiler/` tree, versus 1,543 fixtures — the compiler's coverage is almost entirely end-to-end snapshot, with very little unit-level testing of individual passes. (inferred) — [compiler/packages/babel-plugin-react-compiler/src/__tests__](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/__tests__) [compiler/packages/snap](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/snap)
- Browser-level e2e exists in exactly two places: `compiler/apps/playground/__tests__/e2e/page.spec.ts` (Playwright, `--workers=4`) and `fixtures/flight/__tests__/__e2e__/smoke.test.js`; the 25 other directories under `fixtures/` are manual-testing apps with no automated assertions. — [compiler/apps/playground/playwright.config.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/apps/playground/playwright.config.js) [fixtures/flight/playwright.config.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/fixtures/flight/playwright.config.js) [fixtures/dom/package.json](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/fixtures/dom/package.json)

## Risk map

The genuinely security-sensitive surface is small but sharp: Flight's Server Actions turn attacker-controlled FormData into a module lookup and function invocation, the taint registry is the only guard against serialising server secrets to the client and it is experimental-only, and the DevTools extension bridges page-world `postMessage` to privileged `chrome.runtime` ports while also running string-`eval` payloads through `chrome.devtools.inspectedWindow.eval`. Operationally the biggest fragility is the fork/shim system — `ReactFiberConfig` and `ReactFeatureFlags` resolve differently under Rollup, Jest and Flow, so a change that passes locally can break a channel nobody ran. `ReactFiberWorkLoop.js` at 5,683 lines with ~60 exported functions and module-level mutable state is the highest blast-radius file in the repo, and the Rust port is a live second implementation of the compiler that must stay snapshot-identical to the TypeScript one.
- `loadServerReference` resolves a client-supplied string id straight into `resolveServerReference(bundlerConfig, id)` → `preloadModule` → `requireModule`; the only validation is `typeof id !== 'string'` (which silently returns `null as any`), so the security boundary rests entirely on the bundler-generated `serverManifest`. — [packages/react-server/src/ReactFlightActionServer.js#L46-L75](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L46-L75)
- `decodeAction` distinguishes action fields purely by string prefix (`$ACTION_REF_`, `$ACTION_ID_`, `$ACTION_`) on attacker-controlled FormData keys, and a mismatch falls through to `throw new Error('Cannot handle action key. This is a bug in React.')` — a user-reachable throw framed as an internal invariant. — [packages/react-server/src/ReactFlightActionServer.js#L107-L160](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-server/src/ReactFlightActionServer.js#L107-L160)
- The taint protection against leaking secrets to the client is gated off by default outside experimental builds (`export const enableTaint = __EXPERIMENTAL__`), and `taintUniqueValue` early-returns when the flag is false — stable consumers get no taint enforcement. — [packages/shared/ReactFeatureFlags.js#L94](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js#L94) [packages/react/src/ReactTaint.js#L56-L62](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactTaint.js#L56-L62)
- `TaintRegistryValues` is a plain `Map<string|bigint, TaintEntry>` with manual refcounting in `cleanup()`, relying on `FinalizationRegistry`; the code explicitly notes that if `FinalizationRegistry` is absent it 'assume[s] that objects live forever' — a correctness cliff on older runtimes. — [packages/react/src/ReactTaintRegistry.js#L17-L28](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactTaintRegistry.js#L17-L28) [packages/react/src/ReactTaint.js#L33-L54](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactTaint.js#L33-L54)
- The DevTools extension executes code as strings in the inspected page: `evalScripts.js` defines a `.code` variant for each of `checkIfReactPresentInInspectedWindow`, `reload`, `viewElementSource`, `viewAttributeSource` and the selection bridges, intended for `chrome.devtools.inspectedWindow.eval()`. — [packages/react-devtools-extensions/src/evalScripts.js#L11-L40](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-extensions/src/evalScripts.js#L11-L40)
- The extension's content scripts relay untrusted page-world messages into privileged extension ports: `prepareInjection.js` listens on `window.addEventListener('message', ...)` and `proxy.js` forwards across `chrome.runtime.connect(...)` / `chrome.runtime.onMessage` and back out via `window.postMessage` — a classic content-script trust boundary. — [packages/react-devtools-extensions/src/contentScripts/prepareInjection.js#L11](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-extensions/src/contentScripts/prepareInjection.js#L11) [packages/react-devtools-extensions/src/contentScripts/proxy.js#L123-L255](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-extensions/src/contentScripts/proxy.js#L123-L255) [packages/react-devtools-extensions/src/contentScripts/backendManager.js#L188-L258](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-extensions/src/contentScripts/backendManager.js#L188-L258)
- The DevTools bridge lets the frontend write arbitrary values into a live app — `overrideProps`, `overrideState`, `overrideHookState`, `overrideContext` are first-class bridge events — so anything that can speak the bridge protocol can mutate application state. — [packages/react-devtools-shared/src/bridge.js#L485-L525](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L485-L525) [packages/react-devtools-shared/src/bridge.js#L207-L230](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/bridge.js#L207-L230)
- `__REACT_DEVTOOLS_GLOBAL_HOOK__` is installed as a page global and documented in-source as 'a de facto public API', giving any script on the page a handle on every mounted renderer. — [packages/react-devtools-shared/src/hook.js#L1-L15](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L1-L15) [packages/react-devtools-shared/src/hook.js#L59-L72](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-devtools-shared/src/hook.js#L59-L72)
- `ReactFiberWorkLoop.js` is 5,683 lines with roughly 60 exports and heavy module-level mutable state (`workInProgressRoot`, `workInProgressSuspendedReason`, `workInProgressRootExitStatus`, `executionContext`), making it the single highest blast-radius file — almost every reconciler behaviour change lands here. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L538-L5683](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L538-L5683)
- The fork system is fragile by design: `scripts/rollup/forks.js` substitutes 13 module paths (shared internals, feature flags, fiber config, stream/fizz/flight configs, `EventListener`, `useSyncExternalStore`) and Jest substitutes them differently — so a module can resolve three ways (Rollup, Jest, Flow) and only CI exercises all of them. — [scripts/rollup/forks.js#L55-L470](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/forks.js#L55-L470) [scripts/jest/setupHostConfigs.js#L137-L220](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/setupHostConfigs.js#L137-L220)
- There are 13 `ReactFeatureFlags` forks (`www`, `www-dynamic`, `native-fb`, `native-oss`, `test-renderer`, `eslint-plugin.www`, `readonly`, …); a flag added to the base file without updating every fork is a known failure mode, which is exactly why CI has a dedicated `flags` job and a `/flags` skill. — [packages/shared/forks](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/forks) [.github/workflows/runtime_build_and_test.yml#L192-L215](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L192-L215) [.claude/skills/feature-flags/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/feature-flags/SKILL.md)
- `scripts/release/ci-npmrc` writes `//registry.npmjs.org/:_authToken=${NPM_TOKEN}` and three compiler prerelease workflows inject `NPM_TOKEN` from repository secrets — any workflow change that widens trigger conditions on those files widens publish access. — [scripts/release/ci-npmrc](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/ci-npmrc) [.github/workflows/compiler_prereleases.yml#L29-L36](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_prereleases.yml#L29-L36) [.github/workflows/compiler_prereleases_manual.yml#L24-L41](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_prereleases_manual.yml#L24-L41) [.github/workflows/compiler_prereleases_nightly.yml#L8-L24](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_prereleases_nightly.yml#L8-L24)
- The MCP server's runtime-perf tool launches a real browser (`puppeteer.launch()`) and runs `page.evaluate` on supplied component code — that is code execution on the developer's machine driven by MCP tool input. — [compiler/packages/react-mcp-server/src/tools/runtimePerf.ts#L2-L195](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/tools/runtimePerf.ts#L2-L195)
- An Algolia app id and search API key are hard-coded in `compiler/packages/react-mcp-server/src/utils/algolia.ts` (with a source comment pointing at react.dev's public config) — low severity since they are public search-only credentials, but they are real credentials living in the tree. — [compiler/packages/react-mcp-server/src/utils/algolia.ts#L12-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/utils/algolia.ts#L12-L22)
- The Rust port is a duplicated implementation of a complex pipeline: `compiler/crates/react_compiler/src/entrypoint/pipeline.rs` re-implements the same ~40 passes as `Pipeline.ts`, and `react_compiler/src/lib.rs` re-exports crates 'for backwards compatibility' — divergence between the two is caught only by `yarn snap --rust` in CI. — [compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640) [compiler/crates/react_compiler/src/lib.rs#L1-L11](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/crates/react_compiler/src/lib.rs#L1-L11) [.github/workflows/compiler_rust.yml#L62-L68](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_rust.yml#L62-L68)
- The napi bridge converts Rust panics into `napi::Error` strings rather than structured diagnostics, and relies on a hand-tuned 64 MB thread stack to avoid overflow on deep ASTs — both are heuristic mitigations rather than guarantees. — [compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L26-L48](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler-rust/native/src/lib.rs#L26-L48)
- Legacy code is still resident and flag-guarded rather than removed: `disableLegacyMode`, `LegacyRoot`, `flushSyncWorkOnLegacyRootsOnly`, `isAlreadyFailedLegacyErrorBoundary`, `enableLegacyFBSupport` and `enableLegacyCache` all remain live branches in the work loop and flag file. — [packages/react-reconciler/src/ReactFiberWorkLoop.js#L1092-L1110](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1092-L1110) [packages/react-reconciler/src/ReactFiberWorkLoop.js#L4877-L4890](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L4877-L4890) [packages/shared/ReactFeatureFlags.js#L62-L78](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js#L62-L78)

## Extension points

The repo's main extension mechanism is the host-config pattern: write a `ReactFiberConfig.<renderer>.js`, register the renderer in `scripts/shared/inlinedHostConfigs.js` and add a fork rule, and you get a new React renderer sharing the reconciler unchanged. Bundles are similarly table-driven — add an entry to `scripts/rollup/bundles.js` and a version to `ReactVersions.js` and the build/publish pipeline picks it up. Inside the compiler, the pass list in `Pipeline.ts` / `pipeline.rs` is the ordered registry, `HIR/Globals.ts` is where hook aliasing signatures are declared, and `Environment.ts` is where feature flags live. For tooling, the ESLint plugin merges rules from a `allRules` map, the MCP servers register tools with `server.tool(name, description, schema, handler)`, and Jest behaviour is extended via `@gate` flags declared in `TestFlags.js`.
- New renderers plug in through the host-config shim: implement the interface, then register in `scripts/shared/inlinedHostConfigs.js` with a `shortName` and `entryPoints`, and add a substitution branch in `scripts/rollup/forks.js` for `./packages/react-reconciler/src/ReactFiberConfig.js`. — [scripts/shared/inlinedHostConfigs.js#L11-L700](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/shared/inlinedHostConfigs.js#L11-L700) [scripts/rollup/forks.js#L235-L268](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/forks.js#L235-L268) [packages/react-reconciler/src/ReactFiberConfig.js#L10-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberConfig.js#L10-L22)
- `packages/react-noop-renderer` is the reference implementation of that extension point — a full renderer with `persistent.js`, `server.js`, `flight-client.js`, `flight-server.js` and `flight-modules.js` variants, used as the testbed for reconciler features. — [packages/react-noop-renderer/index.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-noop-renderer/index.js) [packages/react-noop-renderer/persistent.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-noop-renderer/persistent.js) [packages/react-noop-renderer/flight-server.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-noop-renderer/flight-server.js)
- New publishable packages plug into `ReactVersions.js`: the header states 'Packages will not be published unless they are added here', with `stablePackages` for versioned output and `experimentalPackages` for sha-only builds. — [ReactVersions.js#L1-L58](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/ReactVersions.js#L1-L58)
- New build outputs plug into the `bundles.js` table via `bundleTypes` and `moduleTypes` (`ISOMORPHIC`, `RENDERER`, …); `scripts/rollup/build.js#shouldSkipBundle` then decides per bundle×type whether to emit. — [scripts/rollup/bundles.js#L10-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/bundles.js#L10-L60) [scripts/rollup/build.js#L552-L560](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build.js#L552-L560)
- `scripts/rollup/forks.js` is itself an extension registry — a map from module path to a substitution function, currently covering `ReactSharedInternals`, `ReactDOMSharedInternals`, `ReactFeatureFlags`, `SchedulerFeatureFlags`, `DefaultPrepareStackTrace`, `ReactFiberConfig`, `ReactServerStreamConfig`, `ReactFizzConfig`, `ReactFlightServerConfig`, `ReactFlightClientConfig`, `EventListener`, `useSyncExternalStore` and `isServerEnvironment`. — [scripts/rollup/forks.js#L55-L470](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/forks.js#L55-L470)
- New runtime behaviour is introduced behind a flag in `packages/shared/ReactFeatureFlags.js`, mirrored into every fork under `packages/shared/forks/`, and surfaced to tests automatically as a `@gate` name by `TestFlags.js` (which requires `shared/ReactFeatureFlags` on demand). — [packages/shared/ReactFeatureFlags.js#L26-L124](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js#L26-L124) [packages/shared/forks/ReactFeatureFlags.www.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/forks/ReactFeatureFlags.www.js) [scripts/jest/TestFlags.js#L34-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/TestFlags.js#L34-L60)
- The reconciler exposes a stable seam for schedulers: `ReactFiberRootScheduler.js#scheduleCallback` wraps `Scheduler_scheduleCallback(priorityLevel, callback)`, and the Scheduler itself is forked into `SchedulerMock`, `SchedulerNative`, `SchedulerPostTask` variants. — [packages/react-reconciler/src/ReactFiberRootScheduler.js#L626-L645](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js#L626-L645) [packages/scheduler/src/forks/SchedulerMock.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/SchedulerMock.js) [packages/scheduler/src/forks/SchedulerPostTask.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/scheduler/src/forks/SchedulerPostTask.js)
- New compiler passes are inserted by editing the ordered pass list in `Entrypoint/Pipeline.ts` (and its Rust twin `entrypoint/pipeline.rs`); `compiler/CLAUDE.md` mandates reading `docs/passes/` for the pass being changed first. — [compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L540](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts#L119-L540) [compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/crates/react_compiler/src/entrypoint/pipeline.rs#L37-L640) [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md)
- Hook semantics are extensible through aliasing signatures registered in `src/HIR/Globals.ts` via `addHook(DEFAULT_SHAPES, {positionalParams, restParam, returnType, calleeEffect, hookKind, returnValueKind, aliasing: {receiver, params, rest, returns, temporaries, effects}}, id)` — missing an `aliasing` block silently falls back to `DefaultNonmutatingHook`. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts)
- Compiler feature flags are configured in `src/HIR/Environment.ts` and can be overridden per test fixture by a first-line comment pragma (e.g. `// enableJsxOutlining @enableNameAnonymousFunctions:false`). — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts)
- The Rust crates are the extension surface for the port: eleven single-responsibility crates (`react_compiler_lowering`, `_ssa`, `_typeinference`, `_inference`, `_optimization`, `_reactive_scopes`, `_validation`, `_hir`, `_ast`, `_diagnostics`, `_utils`) wired through `Cargo.toml` workspace dependencies. — [compiler/Cargo.toml#L1-L26](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/Cargo.toml#L1-L26) [compiler/crates/react_compiler/src/lib.rs#L1-L11](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/crates/react_compiler/src/lib.rs#L1-L11)
- The ESLint plugin composes its rule table from two hand-written rules plus a spread of `allRules` from `shared/ReactCompiler`, and derives `recommended`/`recommendedLatest` presets by mapping compiler severities through `mapErrorSeverityToESlint` — new compiler diagnostics become lint rules without touching `index.ts`. — [packages/eslint-plugin-react-hooks/src/index.ts#L9-L80](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/eslint-plugin-react-hooks/src/index.ts#L9-L80)
- MCP tools are registered declaratively: `server.tool(name, description, zodSchema, handler)` in `react-mcp-server/src/index.ts`, with tool implementations kept in `src/tools/` (`runtimePerf`, `componentTree`). — [compiler/packages/react-mcp-server/src/index.ts#L33-L70](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/index.ts#L33-L70) [compiler/packages/react-mcp-server/src/tools/runtimePerf.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/packages/react-mcp-server/src/tools/runtimePerf.ts)
- Agent-facing workflows are extensible through `.claude/skills/*/SKILL.md` — currently `verify`, `test`, `fix`, `flow`, `flags`, `feature-flags` and `extract-errors`, each a self-contained markdown procedure with frontmatter. — [.claude/skills/verify/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/verify/SKILL.md) [.claude/skills/feature-flags/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/feature-flags/SKILL.md) [.claude/instructions.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/instructions.md)
- Error messages are extended through `scripts/error-codes/codes.json`: new prod error strings are auto-assigned the next integer code by `extract-errors.js`, so adding a user-visible `throw` means running `yarn extract-errors` and committing the JSON delta. — [scripts/error-codes/extract-errors.js#L1-L60](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/error-codes/extract-errors.js#L1-L60) [.claude/skills/extract-errors/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/extract-errors/SKILL.md)

## Contributor handoff

Treat `/compiler/` and everything else as two separate projects with separate package managers, lockfiles, CI workflows and conventions — the root `CLAUDE.md` says so explicitly, and `compiler/CLAUDE.md` even documents Sapling (`sl`) rather than git for that subtree. Never run `jest` or `rollup` directly; use `yarn test` / `yarn flow` / `yarn linc` / `yarn prettier`, and let CI do builds. The single most important structural fact to internalise before editing is the fork/shim system: `ReactFiberConfig`, `ReactFeatureFlags` and the flight/fizz configs resolve differently under Rollup, Jest and Flow, so 'it works in one channel' is not a signal. Read the work loop, the root scheduler and the feature-flag file before touching reconciler behaviour, and read the relevant `docs/passes/` doc before touching a compiler pass.
- The repo is explicitly split: root `CLAUDE.md` scopes itself to 'All files outside `/compiler/`' and defers the compiler to its own instructions; `compiler/` has its own `package.json`, `yarn.lock`, `Cargo.toml` and CI workflows. — [CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/CLAUDE.md) [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/package.json](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/package.json) [compiler/Cargo.toml](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/Cargo.toml)
- Read first, in order: `CLAUDE.md`, `packages/react-dom/src/client/ReactDOMRoot.js` (entry), `packages/react-reconciler/src/ReactFiberWorkLoop.js` (the engine), `packages/react-reconciler/src/ReactFiberRootScheduler.js` (when work runs), `packages/shared/ReactFeatureFlags.js` (what's on), and `scripts/rollup/forks.js` + `scripts/shared/inlinedHostConfigs.js` (how modules actually resolve). — [CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/CLAUDE.md) [packages/react-reconciler/src/ReactFiberWorkLoop.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberWorkLoop.js) [packages/react-reconciler/src/ReactFiberRootScheduler.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberRootScheduler.js) [scripts/rollup/forks.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/forks.js)
- The prescribed pre-commit gate is `/verify`: `yarn prettier` → `yarn linc` (stop on failure), then `/flow`, `/test` and `/test www` in parallel — mirroring the CI jobs, so passing it locally is a strong predictor of green CI. — [.claude/skills/verify/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/verify/SKILL.md) [.github/workflows/runtime_build_and_test.yml#L118-L285](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L118-L285)
- Yarn 1 is mandatory (`packageManager: yarn@1.22.22`) and Node is pinned by `.nvmrc`, which every CI job consumes via `node-version-file: '.nvmrc'`. — [package.json#L163](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L163) [.nvmrc](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.nvmrc) [.github/workflows/runtime_build_and_test.yml#L54-L61](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L54-L61)
- Do not invoke Jest directly — the root `jest.testRegex` deliberately points at `scripts/jest/dont-run-jest-directly.js`; run `yarn test -r <channel> --env <env>` instead, and `yarn test-www` / `yarn test-stable` for the common channels. — [package.json#L119-L121](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L119-L121) [package.json#L138-L142](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L138-L142) [scripts/jest/jest-cli.js#L10-L50](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/jest-cli.js#L10-L50)
- Do not build locally unless told to: root `CLAUDE.md` states 'Builds are handled by CI', and `yarn build` runs a multi-channel Rollup + Closure pipeline that also shells out to git and rewrites versions. — [CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/CLAUDE.md) [scripts/rollup/build-all-release-channels.js#L24-L180](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/rollup/build-all-release-channels.js#L24-L180)
- Adding a feature flag is a multi-file edit: the base `packages/shared/ReactFeatureFlags.js` plus each of the 13 forks under `packages/shared/forks/`, verified by `yarn flags` and the CI `flags` job. — [packages/shared/ReactFeatureFlags.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/ReactFeatureFlags.js) [packages/shared/forks/ReactFeatureFlags.www.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/shared/forks/ReactFeatureFlags.www.js) [scripts/flags/flags.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/flags/flags.js) [.github/workflows/runtime_build_and_test.yml#L192-L215](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/runtime_build_and_test.yml#L192-L215)
- Adding a user-visible `throw` requires running `yarn extract-errors` and committing the new entry in `scripts/error-codes/codes.json`; the script greps the `build` directory, so it only works after a build exists. — [package.json#L136](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L136) [scripts/error-codes/extract-errors.js#L24-L40](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/error-codes/extract-errors.js#L24-L40) [.claude/skills/extract-errors/SKILL.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.claude/skills/extract-errors/SKILL.md)
- Tests that depend on a flag or channel must carry a `// @gate <expr>` pragma (supports `&&`, `!`, multiple gates); `FIXME`/`TODO` are reserved gate names that disable a test wholesale. — [scripts/jest/TestFlags.js#L1-L52](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/TestFlags.js#L1-L52)
- Compiler work has its own loop: `yarn snap` to run fixtures, `yarn snap -p <pattern> -d` to dump per-pass HIR, `yarn snap -u` to update `.expect.md`, `yarn snap compile <path>` for arbitrary files, `yarn snap minimize <path>` to shrink a repro. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md)
- Before implementing from a Rust-port plan doc, `compiler/CLAUDE.md` requires checking `git log --oneline --grep="<plan-name>"` and the plan's Remaining Work section; afterwards update the plan status, run `/compiler-verify`, and ensure `compiler/scripts/test-babel-ast.sh` passes. — [compiler/CLAUDE.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/CLAUDE.md) [compiler/docs/rust-port/rust-port-architecture.md](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/compiler/docs/rust-port/rust-port-architecture.md) [.github/workflows/compiler_rust.yml#L62-L68](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/.github/workflows/compiler_rust.yml#L62-L68)
- Trap: `packages/react-reconciler/src/ReactFiberConfig.js` throws on import by design. If a new test or script resolves it, the fix is registering the renderer in `scripts/jest/setupHostConfigs.js` / `inlinedHostConfigs.js`, not editing the shim. — [packages/react-reconciler/src/ReactFiberConfig.js#L10-L22](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberConfig.js#L10-L22) [scripts/jest/setupHostConfigs.js#L137-L220](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/jest/setupHostConfigs.js#L137-L220)
- Trap: `packages/react/src/` contains parallel client and server builds of the same package (`ReactClient.js`, `ReactServer.js`, `ReactServer.experimental.js`, `ReactServer.fb.js`, `ReactSharedInternalsClient.js` vs `…Server.js`) — an export added to one is not automatically present in the other. — [packages/react/src/ReactClient.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactClient.js) [packages/react/src/ReactServer.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactServer.js) [packages/react/src/ReactSharedInternalsClient.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactSharedInternalsClient.js) [packages/react/src/ReactSharedInternalsServer.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react/src/ReactSharedInternalsServer.js)
- Safe-to-edit boundaries: `fixtures/` are manual-test apps (only `fixtures/flight` has automated e2e), `scripts/` is developer tooling, and `packages/*/src/__tests__/` are tests. High-caution zones are `ReactFiberWorkLoop.js`, `ReactFiberCommitWork.js`, `ReactFiberHooks.js`, `ReactFizzServer.js`, `ReactFlightServer.js` and anything under `scripts/rollup/` or `scripts/release/`. (inferred) — [fixtures/dom/package.json](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/fixtures/dom/package.json) [fixtures/flight/playwright.config.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/fixtures/flight/playwright.config.js) [packages/react-reconciler/src/ReactFiberCommitWork.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/react-reconciler/src/ReactFiberCommitWork.js) [scripts/release/publish.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/release/publish.js)
- Flow is the type system for runtime code (`flow-bin@^0.317.0`, `postinstall` runs `scripts/flow/createFlowConfigs.js` to generate per-renderer configs) while the compiler and ESLint plugin are TypeScript — so `@flow` pragmas and `$FlowFixMe` suppressions are normal in `packages/` and out of place in `compiler/`. — [package.json#L82-L85](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L82-L85) [package.json#L137](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/package.json#L137) [scripts/flow/createFlowConfigs.js](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/scripts/flow/createFlowConfigs.js) [packages/eslint-plugin-react-hooks/src/index.ts](https://github.com/facebook/react/blob/59aff3e18cb5b3a336c280bbfa57ec37999511b9/packages/eslint-plugin-react-hooks/src/index.ts)

Source repository: https://github.com/facebook/react
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/react.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
