React DOM

React's official renderer for the DOM and server — createRoot, hydrateRoot, and streaming SSR in one package.

Library
npm
v19.2.8
247,416stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
97/100Excellent
Development Activity96
Maintenance96
Community96
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture94
Code Quality90
Innovation88
Learning Curve70

react-dom is the platform-specific renderer that pairs with the react package to turn React element trees into real DOM nodes in the browser or an HTML stream on the server. It exposes createRoot and hydrateRoot for client-side mounting and hydration, plus a family of server APIs — renderToPipeableStream, renderToReadableStream, and the legacy renderToString — for rendering React on Node, edge, and other JavaScript runtimes.

Maintained inside the same monorepo as react by the React core team at Meta, react-dom ships in lockstep with each React release and implements the reconciler’s host-config contract for the DOM: committing fiber updates to real elements, managing the synthetic event system, and handling hydration mismatches. Nearly every production React app — from bare Vite setups to Next.js and Remix — depends on it as the bridge between React’s virtual tree and the actual page.

What You Get

  • createRoot and hydrateRoot for mounting and hydrating client-side React trees
  • Streaming server-render APIs (renderToPipeableStream, renderToReadableStream) for Node, edge, and other runtimes
  • A synthetic event system that normalizes DOM events across browsers with delegated, pooled dispatch
  • Resource-hint APIs (preconnect, preload, preinit) for coordinating asset loading with rendering
  • Legacy renderToString/renderToStaticMarkup APIs for non-streaming SSR use cases

Common Use Cases

  • Mounting a client-rendered single-page React app into a DOM container
  • Hydrating server-rendered HTML on the client so React can attach event listeners without a full re-render
  • Streaming HTML from a Node or edge server as React components resolve, for fast time-to-first-byte SSR
  • Generating static HTML strings at build time for static site generators

Under The Hood

Architecture react-dom is the DOM-target implementation of React’s platform-agnostic renderer, split across two packages in the same monorepo: react-dom (the public entry points in index.js and client.js, re-exporting from src/client/ReactDOMClient.js and src/shared/ReactDOM.js) and react-dom-bindings (the DOM-specific implementation in src/client, src/events, and src/server). createRoot and hydrateRoot, defined in src/client/ReactDOMRoot.js, validate the target container via react-dom-bindings/src/client/ReactDOMContainer.js and hand off to react-reconciler, which drives the actual fiber-tree diffing and commit work — react-dom itself supplies the reconciler’s DOM ‘host config’ (how to create, update, and remove real nodes) rather than reimplementing diffing. Server rendering is a separate code path: ReactDOMFizzServerNode.js, ReactDOMFizzServerEdge.js, and per-runtime entry points like react-dom-server.node.js and react-dom-server.edge.js implement React’s Fizz streaming renderer, each producing a runtime-appropriate stream (Node Writable vs. Web ReadableStream) from the same component tree. Event handling is centralized in react-dom-bindings/src/events, which delegates listeners at the root and dispatches synthetic events through a plugin system rather than attaching handlers per DOM node.

Tech Stack The codebase is authored in Flow-typed JavaScript (flow-bin ^0.317.0) rather than TypeScript, compiled through a custom Babel pipeline (babel.config.js, babel.config-ts.js) and bundled per release channel with Rollup via scripts/rollup/build-all-release-channels.js. It’s a Yarn workspace monorepo (packages/*) with react-dom as one of dozens of interdependent packages (react, react-reconciler, react-dom-bindings, scheduler); react-dom’s only runtime dependency is scheduler, with react itself required as a matching peerDependency. Tests run on Jest 29, and the repo additionally builds an experimental Rust-based React Compiler (the top-level compiler/ directory) that ships as a separate package rather than being part of react-dom directly.

Code Quality Testing is extensive and colocated: over 130 -test.js files sit alongside implementation files across src/client, src/events, src/server, and src/test-utils, covering hydration mismatches, event delegation, and streaming edge cases with React’s internal fixture-based test harness. Code favors small, single-purpose modules (ReactDOMRoot.js, for example, is 380 lines and handles only root creation/options, not rendering itself) with Flow type annotations on public option objects (CreateRootOptions, HydrateRootOptions) documenting every callback’s error/error-info shape. Naming is consistent and DOM-specific (ReactDOM prefix throughout), and feature flags (shared/ReactFeatureFlags, e.g. disableCommentsAsDOMContainers) gate experimental behavior instead of branching on ad hoc conditionals, keeping stable code paths readable.

API Design The public surface is deliberately small and split by concern: react-dom/client for browser mounting (createRoot, hydrateRoot), react-dom/server (and its runtime-specific siblings server.node, server.edge, server.browser) for SSR, and root-level exports like createPortal, flushSync, and the preload/preinit/preconnect resource hints. This subpath-based export design, driven by package.json ‘exports’ conditions keyed on react-server/workerd/bun/node/edge-light, lets bundlers pull in only the runtime-appropriate implementation without dead code — unusually sophisticated for an npm package’s exports map. Getting started requires minimal boilerplate, just one createRoot() call and one .render(), though the breadth of server APIs (five different render-to-stream variants) means picking the right one for your deployment target is the main learning cost, offset by consistent naming and centralized docs at react.dev/reference/react-dom.

Used by 376 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

167

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
Python
66%
Apache 2.0

Agent Control

AI Agents

295

An open-source runtime control plane for AI agents — define safety guardrails once, apply them across agents built on LangChain, CrewAI, Google ADK, or AWS Strands, and update controls without redeploying code.

View details
79
Repo Health
71
Technical
70
Dependency
Built with
Python66%
TypeScript33%
Updated yesterday
Python
99%
MIT

Agent Lightning

AI Development

17,500

A Microsoft-built training framework that optimizes AI agents with reinforcement learning, automatic prompt optimization, or supervised fine-tuning — with near-zero code changes to your existing agent, in any framework.

View details
84
Repo Health
68
Technical
69
Dependency
Built with
Python99%
Updated today
TypeScript
59%
Other

agenta

Developer Tools · Devops · AI Development

4,489

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript59%
Python39%
Updated today
Rust
64%
Apache 2.0

agentgateway

AI Development · Developer Tools

4,420

An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.

View details
88
Repo Health
82
Technical
72
Dependency
Built with
Rust64%
Go24%
Updated yesterday
TypeScript
100%
Apache 2.0

agentic-inbox

AI Agents · Productivity

6,880

A self-hosted email client with an AI agent that reads your inbox, drafts replies automatically, and exposes full email operations over MCP — running entirely on Cloudflare Workers.

View details
32
Repo Health
74
Technical
77
Dependency
Built with
TypeScript100%
Updated 3 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search