renderToHtml
Function: renderToHtml()
renderToHtml(
element):Promise<string>
Defined in: packages/react-email/src/render.ts:33
Render a React element to html like render of @react-email/render, but failing on a render error
@react-email/render does not pass onError: a component throwing in its body makes React fall back to
client rendering, so the render resolves with an empty boundary and only logs the error. Here the first
error is thrown instead, and nothing is logged.
Parameters
element
ReactElement
the element
Returns
Promise<string>
the html document