ReactDOMServer: renderToNodeStream()


You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.


Render a React element to its initial HTML. Returns a Readable stream that outputs an HTML string. The HTML output by this stream is exactly equal to what ReactDOMServer.renderToString would return.

Server-only. This API is not available in the browser.

Related concepts

ReactDOMServer: renderToNodeStream() — Structure map

Clickable & Draggable!

ReactDOMServer: renderToNodeStream() — Related pages: