Server React DOM APIsLink for this heading
January 6, 2025 · View on GitHub
The react-dom/server APIs let you server-side render React components to HTML. These APIs are only used on the server at the top level of your app to generate the initial HTML. A framework may call them for you. Most of your components don’t need to import or use them.
Server APIs for Node.js StreamsLink for Server APIs for Node.js Streams
These methods are only available in the environments with Node.js Streams:
renderToPipeableStreamrenders a React tree to a pipeable Node.js Stream.
Server APIs for Web StreamsLink for Server APIs for Web Streams
These methods are only available in the environments with Web Streams, which includes browsers, Deno, and some modern edge runtimes:
renderToReadableStreamrenders a React tree to a Readable Web Stream.
Legacy Server APIs for non-streaming environmentsLink for Legacy Server APIs for non-streaming environments
These methods can be used in the environments that don’t support streams:
renderToStringrenders a React tree to a string.renderToStaticMarkuprenders a non-interactive React tree to a string.
They have limited functionality compared to the streaming APIs.
Copyright © Meta Platforms, Inc
no uwu plz
uwu?
Logo by@sawaratsuki1004
More
On this page
- Overview
- Server APIs for Node.js Streams
- Server APIs for Web Streams
- Legacy Server APIs for non-streaming environments
Search⌘CtrlK
-
react@19
- Overview
- Hooks
- Components
- APIs
-
react-dom@19
- Hooks
- Components
- APIs
- Client APIs
- Server APIs
- Static APIs
-
Rules of React
- Overview
-
React Server Components
- Server Components
- Server Functions
- Directives
-
Legacy APIs
- Legacy React APIs
Is this page useful?