---
title: "Discussion on \"Generate HTML Emails with React on the Server\" | Hashnode"
description: "Discussion on \"Generate HTML Emails with React on the Server\". This might seem strange and some questions probably popped up in your head. Why would you want to use JSX for emails? Can you actually render JSX on the server?\nWhy JSX?\nSo... JSX is really good for templating. You can simply do something like this:\n..."
url: "https://hashnode.com/posts/generate-html-emails-with-react-on-the-server/5fea1bc05283d44a62c722a4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Generate HTML Emails with React on the Server](https://chjweb.se/blog/generate-html-emails-with-react-on-the-server?utm_source=hashnode&utm_medium=feed)

This might seem strange and some questions probably popped up in your head. Why would you want to use JSX for emails? Can you actually render JSX on the server? Why JSX? So... JSX is really good for templating. You can simply do something like this: ...

Dec 28, 2020 · 8 min read · chjweb.se  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#email](https://hashnode.com/tag/email)

## Written by

[Carl Hallén Jansson](https://hashnode.com/@chjweb)

@chjweb · Sweden

  
[View profile](https://hashnode.com/@chjweb)

Frontend developer and freelancer

I am a freelancing web developer from Sweden with a passion for JAMstack and serverless.

## Responses 1

Markdown supported · ⌘↵ to post

[shadowtime2000](https://hashnode.com/@shadowtime2000)

[Dec 29, 2020](https://hashnode.com/posts/generate-html-emails-with-react-on-the-server/5fea1bc05283d44a62c722a4/comment/5fea9a595283d44a62c72791)

Cool, but really this pattern and stuff can be used for anything, not just emails and it may be better to just use template engines instead so you don't have to use a bundler.

[Carl Hallén Jansson](https://hashnode.com/@chjweb)

[Dec 29, 2020](https://hashnode.com/posts/generate-html-emails-with-react-on-the-server/5fea1bc05283d44a62c722a4/comment/5fea9a595283d44a62c72791#reply-5feaeab5e88ae25261e88968)

Yeah, I don't disagree. I just wanted to show how you can use familiar frontend tools to build HTML emails.

And normally, I wouldn't even have to use a bundler for this, since I'm usually using Typescript.

Using template engines is totally valid and arguably easier to use, but I've found that I prefer to use React as a templating engine, and I thought others might be interested doing so too.
