This page covers the layout of the React monorepo, what each package does, how packages depend on each other, and how the Yarn workspace is configured. It does not cover the internal implementation of any subsystem — for that, see the pages listed in the table of contents. For the build pipeline that turns these packages into published artifacts, see Build System and Package Distribution.
The repository uses a single Yarn workspace rooted at the repository root. All publishable and internal packages live under packages/. The compiler lives under a separate top-level compiler/ directory.
react/
├── compiler/ # React Compiler (babel plugin + tooling)
├── packages/ # All npm packages and internal utilities
│ ├── react/
│ ├── react-dom/
│ ├── react-reconciler/
│ ├── scheduler/
│ ├── shared/ # Internal-only shared utilities
│ └── ...
├── scripts/ # Build, release, test, and lint scripts
│ ├── rollup/ # Rollup build configuration
│ ├── jest/ # Jest runner configuration
│ ├── flow/ # Flow type configs per renderer
│ ├── release/ # Release automation
│ └── flags/ # Feature flag tooling
└── fixtures/ # Manual test apps
The workspace declaration is minimal:
The compiler/ directory is linked in via a pre-build shell script (scripts/react-compiler/link-compiler.sh) rather than through the workspace, because the compiler is released on a separate cadence.
Sources: package.json1-6 package.json124-126
These are the packages that application authors import directly.
| Package | npm Name | Version | Description |
|---|---|---|---|
packages/react | react | 19.3.0 | Public React API: hooks, components, element creation |
packages/react-dom | react-dom | 19.3.0 | DOM renderer, hydration, server rendering entry points |
packages/react-is | react-is | 19.3.0 | Brand-checking utilities (isElement, isPortal, etc.) |
packages/react-art | react-art | 19.3.0 | Renderer for SVG/Canvas/VML via the ART library |
Sources: packages/react/package.json1-52 packages/react-dom/package.json1-126 packages/react-is/package.json1-26 packages/react-art/package.json1-41
These packages underpin all renderers but are generally not imported by application code.
| Package | npm Name | Version | Description |
|---|---|---|---|
packages/react-reconciler | react-reconciler | 0.34.0 | Fiber reconciler; public API for building custom renderers |
packages/scheduler | scheduler | 0.28.0 | Cooperative, priority-based task scheduler |
react-reconciler is the foundation that react-dom, react-native-renderer, react-art, and react-test-renderer all build on. It exports its API from ReactFiberReconciler.js and uses a host-config abstraction to stay renderer-agnostic. See Host Configuration Abstraction.
Sources: packages/react-reconciler/package.json1-34 packages/scheduler/package.json1-27
| Package | npm Name | Description |
|---|---|---|
packages/react-dom | react-dom | Browser DOM + SSR (Fizz + legacy) |
packages/react-native-renderer | react-native-renderer | React Native — ships both Paper (legacy) and Fabric renderers |
react-native-renderer contains two top-level entry files:
ReactNativeRenderer.js — Paper renderer using UIManagerReactFabric.js — Fabric renderer using nativeFabricUIManagerBoth call into react-reconciler/src/ReactFiberReconciler for container creation and updates.
Sources: packages/react-native-renderer/src/ReactNativeRenderer.js1-223 packages/react-native-renderer/src/ReactFabric.js1-241
These packages integrate React Server Components with specific bundlers. They are not general-purpose; each one wraps the Flight protocol for a particular bundler's module system.
| Package | npm Name | Bundler |
|---|---|---|
packages/react-server-dom-webpack | react-server-dom-webpack | Webpack |
packages/react-server-dom-turbopack | react-server-dom-turbopack | Turbopack |
packages/react-server-dom-parcel | react-server-dom-parcel | Parcel |
packages/react-server-dom-esm | react-server-dom-esm | Native ESM |
packages/react-server-dom-fb | (internal, Facebook) | Internal FB bundler |
packages/react-server-dom-unbundled | react-server-dom-unbundled | Unbundled/dev |
For details on the Flight protocol these packages implement, see React Server Components (Flight) and Build Integration for Server Components.
Sources: .eslintrc.js329-334
| Package | npm Name | Description |
|---|---|---|
packages/react-devtools-shared | (internal) | Shared backend/frontend logic for DevTools |
packages/react-devtools-extensions | react-devtools-extensions | Chrome/Firefox/Edge browser extension |
packages/react-devtools-timeline | react-devtools-timeline | Profiling timeline viewer |
packages/react-debug-tools | react-debug-tools | Hooks inspection API used by DevTools |
packages/react-refresh | react-refresh | Hot module reload integration |
See React DevTools Architecture and DevTools Distribution and Integration for internals.
Sources: .eslintrc.js336-340 package.json127-128
The compiler lives under compiler/ (not packages/). Its packages are linked via the pre-build step.
| Package | npm Name | Description |
|---|---|---|
compiler/packages/babel-plugin-react-compiler | babel-plugin-react-compiler | Main Babel plugin for auto-memoization |
compiler/packages/eslint-plugin-react-compiler | eslint-plugin-react-compiler | IDE diagnostics for compiler issues |
compiler/packages/react-compiler-healthcheck | react-compiler-healthcheck | CLI scanner for incompatible patterns |
compiler/packages/react-compiler-runtime | react-compiler-runtime | Runtime support for compiled output |
compiler/packages/react-mcp-server | react-mcp-server | MCP tool server for AI assistants |
See React Compiler and Compiler Pipeline and HIR for details.
| Package | npm Name | Description |
|---|---|---|
packages/react-test-renderer | react-test-renderer | In-memory renderer for snapshot testing |
packages/jest-react | jest-react | Jest matchers for concurrent React tests |
packages/react-noop-renderer | (not published) | No-op renderer used in reconciler unit tests |
packages/internal-test-utils | (not published) | Shared test helpers (act, waitForAll, etc.) |
packages/dom-event-testing-library | (not published) | DOM event simulation for tests |
Sources: packages/react-test-renderer/package.json1-35 packages/jest-react/package.json1-32
| Package | npm Name | Description |
|---|---|---|
packages/eslint-plugin-react-hooks | eslint-plugin-react-hooks | Rules of Hooks + exhaustive-deps lint rules |
See ESLint Plugin for React Hooks for the implementation.
Sources: packages/eslint-plugin-react-hooks/package.json1-68
shared)packages/shared is not published to npm. It is a source-level utility module imported by all other packages during development and build time. Key files:
| File | Purpose |
|---|---|
shared/ReactVersion.js | Single source of truth for the current version string |
shared/ReactSymbols.js | Symbol.for(...) constants used to tag element types |
shared/ReactFeatureFlags.js | Central feature flag definitions (forked per target) |
shared/ReactTypes.js | Shared Flow type definitions |
Imports from shared/ are rewritten by the build system at bundle time; they never appear in published output. See Feature Flags System for the fork mechanism.
Sources: packages/shared/ReactVersion.js1-15 packages/shared/ReactSymbols.js1-75
Inter-package dependency relationships
Sources: packages/react-dom/package.json18-23 packages/react-reconciler/package.json28-33 packages/react-test-renderer/package.json21-27 packages/react-art/package.json24-30 packages/jest-react/package.json21-26
Mapping package names to their primary source files
Sources: packages/react/index.js1-74 packages/react/src/ReactClient.js1-137 packages/react-dom/package.json51-121 packages/react-native-renderer/src/ReactNativeRenderer.js1-40 packages/react-native-renderer/src/ReactFabric.js1-30
react-dom Export Conditionsreact-dom is the most complex package in terms of conditional exports. Its package.json maps subpaths to environment-specific bundles:
| Export path | Environment | Bundle file |
|---|---|---|
. | default | index.js |
. | react-server | react-dom.react-server.js |
./client | default | client.js |
./server | Node.js | server.node.js |
./server | browser | server.browser.js |
./server | edge/workerd | server.edge.js |
./server | Bun | server.bun.js |
./static | Node.js | static.node.js |
./profiling | default | profiling.js |
packages/react-dom/package.json51-121
react Export ConditionsThe react package has server-specific exports for the react-server condition, which omits client-only APIs like hooks:
| Export path | Condition | Entry |
|---|---|---|
. | default | index.js (full client API) |
. | react-server | react.react-server.js (server subset) |
./jsx-runtime | default | jsx-runtime.js |
./jsx-runtime | react-server | jsx-runtime.react-server.js |
./compiler-runtime | any | compiler-runtime.js |
packages/react/package.json24-43
react-native-renderer ships two renderer implementations in the same package:
ReactNativeRenderer.js) uses UIManager from react-native/Libraries/ReactPrivate/ReactNativePrivateInterface and always renders in legacy mode.ReactFabric.js) uses nativeFabricUIManager and supports concurrent mode.ReactNativePublicCompat.js for findNodeHandle, dispatchCommand, and sendAccessibilityEvent.Sources: packages/react-native-renderer/src/ReactNativeRenderer.js17-47 packages/react-native-renderer/src/ReactFabric.js17-52 packages/react-native-renderer/src/ReactNativePublicCompat.js1-30 packages/react-native-renderer/src/ReactNativeTypes.js144-203
| Tool | Version / Config |
|---|---|
| Package manager | Yarn 1.22.22 (packageManager field in root package.json) |
| Type checker | Flow (flow-bin ^0.279.0) |
| Type checker (compiler) | TypeScript (typescript ^5.4.3) |
| Test runner | Jest 29 (scripts/jest/jest-cli.js) |
| Bundler | Rollup 3 (scripts/rollup/) |
| Linter | ESLint 7 (root .eslintrc.js) |
| Formatter | Prettier 3 |
Flow is configured per-renderer via generated config files. scripts/flow/createFlowConfigs.js (run as the postinstall hook) generates one .flowconfig per renderer target by substituting %REACT_RENDERER_FLOW_OPTIONS% and %REACT_RENDERER_FLOW_IGNORES% into the template at scripts/flow/config/flowconfig.
Sources: package.json121-163 scripts/flow/config/flowconfig1-44 scripts/flow/createFlowConfigs.js1-10
Refresh this wiki