Skip to content

How to send a React email in Express with Resend? #1322

Closed Answered by gabrielmfern
masoncusack asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, that's the general intent with the email components. React components aren't necessarily tied to the browser or the DOM, so we do the rendering into pure HTML since the React components are basically like a JSON object in the end.

So yes, you can import the React component into your express server as long as you have the types and JSX configured properly. Be aware that it will need a compilation step to use the JSX as well though, tsc will do the trick as long as you configure it right, as I mentioned before, but if you are using just plain JavaScript you will need something else.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@masoncusack
Comment options

@gabrielmfern
Comment options

@masoncusack
Comment options

@gabrielmfern
Comment options

Answer selected by gabrielmfern
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants