4 ms·
Agreed that MJML is great, but I wouldn't call JSX a useless abstraction. Using JSX as a templating language for MJML has real benefits, like being able to use
by lries 4y ago
Agreed that MJML is great, but I wouldn't call JSX a useless abstraction. Using JSX as a templating language for MJML has real benefits, like being able to use javascript directly in templates instead of having to remember handlebars/mustache/nunjucks/etc templating syntax.
And libraries like mjml-react make it really easy.
https://github.com/wix-incubator/mjml-react/ https://github.com/wix-incubator/mjml-react/
- Theryston 4y agoif you read a bit of the jsx mail documentation you will see that it not only allows you to use jsx in emails, it does that and gives you a complete development environment with even an email client simulator for you to be your email in time real
- rockwotj 4y agoCame here to saw we use mjnl react and it's awesome to be able to wrap mjml in your own components.
- evv 4y agoMJML-React is awesome to use because of the JSX support: 1. you can integrate real JS without using some templatey thing, and 2. type safety with TS, helpful for auto-completion and robustness Anyways it seems that Wix is no longer maintaining the project and Faire has taken it on: https://github.com/Faire/mjml-react https://github.com/Faire/mjml-react
- funstuff007 4y agoAgreed. We use Python + Jinja to create dynamic mjml.