Support rendering React components to a string on the server #67702
chriskuech
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Render react components to an HTML string imperatively on the server, such as to render an email template or render the content of a PDF.
Non-Goals
Rendering a component to HTML in response to an HTTP request (ie normal NextJS rendering scenario)
Background
This is what I'm currently doing to access ReactDOM Server, which seems very hacky and unsustainable.
Proposal
Expose ReactDOM Server as a normal package that can use
create-next-app
's chosen module system (esnext, not cjs), without "legacy" in the path and with proper TS typings.Beta Was this translation helpful? Give feedback.
All reactions