React DOM

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

Library
npm
v19.3.0
250,786 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
98 /100 Excellent
Development Activity 100
Maintenance 96
Community 96
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 94
Code Quality 90
Innovation 88
Learning Curve 70

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 453 apps in this directory

Ruby
79%
GPL 3.0

OpenProject

Collaboration · Productivity · Project Management

16,229

The open source project management platform that unifies Gantt charts, agile boards, time tracking, and team collaboration under full self-hosted control.

View details
96
Repo Health
79
Technical
69
Dependency
Built with
Ruby 79%
TypeScript 13%
Updated 1 weeks ago
TypeScript
93%
MIT

OpenReel Video

Video Editors

5,211

A browser-based, GPU-accelerated video editor with multi-track timelines, color grading, and 4K export — no uploads, no installs, no watermarks.

View details
66
Repo Health
80
Technical
74
Dependency
Built with
TypeScript 93%
Updated 1 months ago
TypeScript
55%
Other

OpenReplay

Analytics

12,911

Self-hosted session replay and product analytics suite that lets you see exactly what users do on your web app — without sending data to third parties.

View details
90
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 55%
Go 13%
Updated 2 weeks ago
TypeScript
82%
MIT

OpenScreen

Design Tools · Note Taking · Productivity

39,963

Free, open-source screen recorder with zooms, annotations, and system audio capture

View details
52
Repo Health
85
Technical
78
Dependency
Built with
TypeScript 82%
Updated 3 months ago
TypeScript
94%
Apache 2.0

Openship

Devops · Hosting Control Panel

12,979

Openship is an open-source, self-hostable deployment platform that points at a repo and builds, ships, routes, and TLS-terminates the app — driven from a desktop app, web dashboard, or CLI.

View details
84
Repo Health
85
Technical
65
Dependency
Built with
TypeScript 94%
Updated 1 weeks ago
JavaScript
92%
Other

OpenSign

Digital Signiture

7,036

Self-host a full-featured DocuSign alternative with unlimited e-signatures, multi-signer workflows, and cryptographic PDF signing.

View details
79
Repo Health
61
Technical
70
Dependency
Built with
JavaScript 92%
Updated 1 months ago
TypeScript
91%
AGPL 3.0

OpenStock

Analytics

19,402

Free, open-source stock market tracker with real-time data, watchlists, price alerts, and AI-powered market summaries.

View details
72
Repo Health
70
Technical
74
Dependency
Built with
TypeScript 91%
Updated 1 weeks ago
Python
75%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

38,819

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 75%
Rust 12%
Updated 1 weeks ago
JavaScript
48%
MIT

OpenWhispr

AI Assistants · Productivity · Voice AI

8,711

Privacy-first, cross-platform voice-to-text with local AI and cloud options

View details
88
Repo Health
80
Technical
71
Dependency
Built with
JavaScript 48%
TypeScript 46%
Updated 1 weeks 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