Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/servest/vendor/https/dev.jspm.io/react-dom/server.js

🌾A progressive http server for Deno🌾
Latest
import * as servest from "https://deno.land/x/servest@v1.3.4/vendor/https/dev.jspm.io/react-dom/server.js";

Functions

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.

Similar to renderToString, except this doesn't create extra DOM attributes such as data-reactid, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.

Similar to renderToNodeStream, except this doesn't create extra DOM attributes such as data-reactid, that React uses internally. The HTML output by this stream is exactly equal to what ReactDOMServer.renderToStaticMarkup() would return.

Render a React element to its initial HTML. This should only be used on the server. React will return an HTML string. 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.