Server React DOM APIs
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 Web Streams
다음 메서드들은 브라우저, Deno 및 일부 최신 엣지 런타임을 포함하는 Web Stream이 있는 환경에서만 사용할 수 있습니다.
renderToReadableStream
renders a React tree to a Readable Web Stream.resume
resumesprerender
to a Readable Web Stream.
Server APIs for Node.js Streams
These methods are only available in the environments with Node.js Streams:
renderToPipeableStream
renders a React tree to a pipeable Node.js Stream.resumeToPipeableStream
resumesprerenderToNodeStream
to a pipeable Node.js Stream.
Legacy Server APIs for non-streaming environments
다음 메서드들은 Stream을 지원하지 않는 환경에서 사용할 수 있습니다.
renderToString
은 React 트리를 문자열로 렌더링합니다.renderToStaticMarkup
은 상호작용하지 않는 React 트리를 문자열로 렌더링합니다.
위 메서드들은 스트리밍 API와 비교하여 기능이 제한적입니다.