package
React package for working with the DOM.
npm install react-domGitHub-flavored package documentation.
Across all versions, last 30 days.
921,556,011 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
7.8 MB
Includes dependencies.
Latest published Oct 14, 2026
experimental
react-domThis package serves as the entry point to the DOM and server renderers for React. It is intended to be paired with the generic React package, which is shipped as react to npm.
npm install react react-domreact-bot
react-core@meta.com
import { createRoot } from 'react-dom/client';
function App() {
return <div>Hello World</div>;
}
const root = createRoot(document.getElementById('root'));
root.render(<App />);import { renderToPipeableStream } from 'react-dom/server';
function App() {
return <div>Hello World</div>;
}
function handleRequest(res) {
// ... in your server handler ...
const stream = renderToPipeableStream(<App />, {
onShellReady() {
res.statusCode = 200;
res.setHeader('Content-type', 'text/html');
stream.pipe(res);
},
// ...
});
}react-domreact-dom/clientreact-dom/server