# System map — facebook/react

> Canonical page: https://codevetter.com/unpack/react/system-map

# System map — facebook/react

Scanned commit 59aff3e18cb5b3a336c280bbfa57ec37999511b9 (2026-09-18). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

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)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

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