Recently, I was going back to rendering HTML on the server, like good ol' 90s. In my opinion, one of the best things React brought us was JSX. The ability to write transpile-time type-safe templates with TSX is incredible.
But emails always were a pain in the ass. Luckily, mjml solved it long time ago. But mjml is just markup, you still need templating on top of it. Handlebars is a good solution, but then you need to compile mjml, compile handlebars, and keep the template types in-sync with the application types.
With the help of Claude Code, I have built a custom JSX runtime for generating mjml strings. Sure, react.email and mjml-react exist, but these depend on react and react-dom for no reason.
So if you, like me, love JSX/TSX, and mjml, and want to write type-safe emails without dragging react as a dependency, check out my repo[0], give it a star, and feedback!
Cheers!