PHP 8.2.30
Preview: README.md Size: 1.08 KB
/home/byroehnu/.trash/node_modules11/adminjs/node_modules/react-dom/README.md

# `react-dom`

This 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.

## Installation

```sh
npm install react react-dom
```

## Usage

### In the browser

```js
import { createRoot } from 'react-dom/client';

function App() {
  return <div>Hello World</div>;
}

const root = createRoot(document.getElementById('root'));
root.render(<App />);
```

### On the server

```js
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);
    },
    // ...
  });
}
```

## API

### `react-dom`

See https://reactjs.org/docs/react-dom.html

### `react-dom/client`

See https://reactjs.org/docs/react-dom-client.html

### `react-dom/server`

See https://reactjs.org/docs/react-dom-server.html

Directory Contents

Dirs: 2 × Files: 10

Name Size Perms Modified Actions
cjs DIR
- drwxr-xr-x 2026-02-28 00:29:50
Edit Download
umd DIR
- drwxr-xr-x 2026-02-28 00:29:52
Edit Download
619 B lrw-r--r-- 2026-02-28 00:26:42
Edit Download
1.33 KB lrw-r--r-- 2026-02-28 00:26:52
Edit Download
1.06 KB lrw-r--r-- 2026-02-28 00:26:34
Edit Download
1.32 KB lrw-r--r-- 2026-02-28 00:29:58
Edit Download
1.33 KB lrw-r--r-- 2026-02-28 00:27:04
Edit Download
1.08 KB lrw-r--r-- 2026-02-28 00:29:58
Edit Download
658 B lrw-r--r-- 2026-02-28 00:29:54
Edit Download
58 B lrw-r--r-- 2026-02-28 00:29:54
Edit Download
646 B lrw-r--r-- 2026-02-28 00:29:56
Edit Download
220 B lrw-r--r-- 2026-02-28 00:29:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).