ReactDOMServer.renderToStaticMarkup

ReactDOMServer.renderToStaticMarkup

1
string renderToStaticMarkup(ReactElement element)

Similar to renderToString, except this doesn't create extra DOM attributes such as data-react-id, 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.

doc_React
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.