Factory.ai

Open-Source Wikis

/

React

/

Packages

facebook/react

Packages

The packages/ directory contains every npm-published package in the runtime monorepo, plus a few internal-only ones used by the build and test infrastructure. This page is a guided tour. Each major package has its own page; small or thin-wrapper packages are summarized in other-packages.

The mental model

graph TD
  ReactCore[react] -->|elements + dispatcher| Reconciler[react-reconciler]
  Reconciler -->|host config fork| DOMBindings[react-dom-bindings]
  Reconciler -->|host config fork| Native[react-native-renderer]
  Reconciler -->|host config fork| Art[react-art]
  Reconciler -->|host config fork| TestR[react-test-renderer]
  Reconciler -->|host config fork| Noop[react-noop-renderer]
  Reconciler -->|task scheduling| Scheduler[scheduler]
  DOMBindings -->|public surface| ReactDOM[react-dom]
  Server[react-server] -->|streamed| FlightWebpack[react-server-dom-webpack]
  Server -->|streamed| FlightParcel[react-server-dom-parcel]
  Server -->|streamed| FlightTurbo[react-server-dom-turbopack]
  Server -->|streamed| FlightESM[react-server-dom-esm]
  Server -->|HTML chunks| ReactDOM
  Refresh[react-refresh] -.->|hot replace| ReactCore
  DevToolsExt[react-devtools-extensions] -.->|inspects| Reconciler
  Shared[shared] -.->|symbols, flags, internals| ReactCore
  Shared -.->|symbols, flags, internals| Reconciler
  Shared -.->|symbols, flags, internals| DOMBindings

Packages broadly fall into seven groups.

1. The core

  • reactpackages/react/. The user-facing API: createElement, hooks, Children, forwardRef, memo, lazy, Suspense, startTransition, cache, act, the JSX runtimes. Almost no logic of its own — it routes through a dispatcher that the active renderer installs.

  • react-reconcilerpackages/react-reconciler/. The fiber engine. Everything renderer-agnostic: the work loop, lanes, hooks, suspense, hydration, transitions, view transitions, the commit phase. The single largest package.

  • schedulerpackages/scheduler/. Cooperative task scheduler used by the reconciler. Yields to the browser between work units via MessageChannel / postTask.

  • shared (covered in other-packages) — packages/shared/. Cross-package internals: the symbol table, feature flags, ReactSharedInternals, error utilities. Not published as its own npm package.

2. Renderers

  • react-dompackages/react-dom/. The browser DOM renderer (createRoot, hydrateRoot) plus the streaming SSR drivers (react-dom/server.node, .edge, .browser, .bun) and the static prerender drivers. The DOM-specific reconciler config lives in the sibling package react-dom-bindings.

  • react-dom-bindingspackages/react-dom-bindings/. The DOM host config. react-dom re-exports from here; this package is what react-reconciler actually imports from at build time when building a DOM bundle. See the discussion under react-dom.

  • react-native-rendererpackages/react-native-renderer/. The Fabric host config. (The legacy "Paper" renderer was removed in early 2026.) Bridges to React Native's C++ shadow tree.

  • react-artpackages/react-art/. Tiny renderer for the ART shape library — Canvas/SVG/VML.

  • react-test-rendererpackages/react-test-renderer/. Renders to a JSON tree. Mostly used by snapshot testers; React's own tests use react-noop-renderer in preference.

  • react-noop-rendererpackages/react-noop-renderer/. In-memory renderer; the test platform of choice for the React team's reconciler tests.

3. Server / streaming

  • react-serverpackages/react-server/. The streaming HTML server (Fizz) and the Server Components writer (Flight). Both engines live here. Bundler-specific clients live in the next group.

  • react-server-dom-webpackpackages/react-server-dom-webpack/. Flight bindings for webpack's manifest format. Includes a Node and an Edge runtime.

  • react-server-dom-parcelpackages/react-server-dom-parcel/. Same idea, for Parcel's manifest format.

  • react-server-dom-turbopackpackages/react-server-dom-turbopack/. Flight bindings for Turbopack.

  • react-server-dom-esmpackages/react-server-dom-esm/. Bundler-less variant; uses native ESM imports.

  • react-server-dom-unbundledpackages/react-server-dom-unbundled/. Like esm but without any module-resolution layer.

  • react-server-dom-fbpackages/react-server-dom-fb/. Facebook-internal bundler.

  • react-flight-server-fbpackages/react-flight-server-fb/. New as of #36309 — Facebook-internal Flight server. Strips down to what the FB bundler needs.

These all share most code via react-server. See react-server-dom for what differs between them.

  • react-markuppackages/react-markup/. Renders an RSC subtree to a string of markup, intended for use in static contexts that can't stream.

  • react-clientpackages/react-client/. Shared client runtime used by every Flight client (parses incoming stream, allocates IDs, resolves chunks, etc.).

4. DevTools

  • react-devtools — overview of the DevTools ecosystem. The actual code is split across react-devtools-extensions/ (browser extension), react-devtools-core/ (the standalone), react-devtools-shared/ (the bulk of the logic), react-devtools-fusebox/, react-devtools-inline/, react-devtools-shell/, react-devtools-timeline/, plus react-devtools-extensions's build pipeline.

  • react-debug-toolspackages/react-debug-tools/. The lower-level fiber inspection helpers used by DevTools (and by act warnings).

5. Lint and dev-time helpers

  • eslint-plugin-react-hookspackages/eslint-plugin-react-hooks/. The react-hooks/rules-of-hooks and react-hooks/exhaustive-deps lint rules. Now also includes compiler-aware rules (v7+).

  • react-refreshpackages/react-refresh/. The fast-refresh runtime injected by bundler plugins (Vite, Next.js, Metro, etc.) so editing a component doesn't lose its state.

  • jest-reactpackages/jest-react/. Jest matchers for renderer output (toFlushAndYield, toMatchRenderedOutput, etc.). Used in this repo's own tests and by some external users.

  • internal-test-utilspackages/internal-test-utils/. Internal-only — the waitForAll/waitForPaint/assertLog helpers used by every reconciler test.

  • dom-event-testing-librarypackages/dom-event-testing-library/. Testing utility for synthesizing DOM events with the right behavior for React's event system.

6. Smaller packages

  • react-cachepackages/react-cache/. The original (pre-React-18) experimental data-cache primitive. Largely superseded by Suspense + the cache() API.
  • use-subscriptionpackages/use-subscription/. Now an alias for useSyncExternalStore; kept for backward compatibility.
  • use-sync-external-storepackages/use-sync-external-store/. The shimmed-on-old-React version of useSyncExternalStore.
  • react-ispackages/react-is/. isValidElement, typeOf checks. Tiny.
  • react-suspense-test-utilspackages/react-suspense-test-utils/. Helpers for asserting Suspense behavior in tests.
  • react-flight-server-fb — Facebook-internal Flight server (see Server group above).
  • react-debug-tools — see DevTools group.

7. Internal-only

  • sharedpackages/shared/. Symbols, flags, ReactSharedInternals. Not published.

For a per-page deep dive on each major package, follow the links in the headings above. The full list with one-line descriptions lives in other-packages.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Packages – React wiki | Factory