Live data from Hacker News

JSX Mail: Ending All Your Problems When Creating Email Templates

jsx-mail.org

41–50 of 60 posts

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#41

> Which of these two codes can you understand faster? To me, the first one, but I’m not convinced JSX is a good idea anywhere and I’ve been writing HTML for 30 years.

It probably targets developers that learned web development while learning React. It is at least a good idea for them. I think jsx-email wants to be the jsx version of mjml.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#42

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

I'm currently integrating MJML into a React/JSX context. From my vantage point, MJML is the abstraction.

I once worked with a guy who kept looking over my shoulder and saying 'just use binary'. Nice guy, but they had to let him go.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#43

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

I'm using mjml-react which gives me: - proper i18n with any react i18n library - js to create complicated emails - nicer component reuse story. - syntax highlighting and completion when used with Typescript - can be integrated with other nice js tools like Storybook for seeing all emails in one place and play with their props. How is that useless?

HNers need to learn to just ask people why they use a given tech instead of dismissing it outright because the HNer likes to do things a different way.

The discourse would be much less boring.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#44

> Which of these two codes can you understand faster? To me, the first one, but I’m not convinced JSX is a good idea anywhere and I’ve been writing HTML for 30 years.

It probably targets developers that learned web development while learning React. It is at least a good idea for them. I think jsx-email wants to be the jsx version of mjml.

Or anyone who wants a tempting system or anyone who wants to conditionally render html esp in a templating system they already use, integrated with components and libraries they already have defined.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#45
post #6
post #2

Just don't forget the plaintext version! Even Gmail/Outlook/Yahoo users may disable js and/or HTML when reading mail.

I'm assuming this precompiles the HTML before sending it, given the render() call.

A Plaintext email would show the html tags in plaintext. It’s probably not something this library wants to solve since stripping html tags from an html email isn’t necessarily a coherent plaintext email either.

Generating a plaintext message dynamically isn’t much of a pain point but html emails can be.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#46

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

Early versions of MJML used JSX class components.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#47
post #21

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

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/

Agreed. We use Python + Jinja to create dynamic mjml.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#48

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

jsx mail not only solves the compatibility issue like others do, it also has things like a mail client emulator. especially if you want to use it without being linked to a programming language, you can just use the CLI that will give you pure HTML and CSS, among that several features that were designed to improve and facilitate the creation of email templates

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#49
post #21

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

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/

if 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

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#50

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

I'm using mjml-react which gives me: - proper i18n with any react i18n library - js to create complicated emails - nicer component reuse story. - syntax highlighting and completion when used with Typescript - can be integrated with other nice js tools like Storybook for seeing all emails in one place and play with their props. How is that useless?

I don't call it useless, I know the power he has, so I think he must have more competitors and we're here for that.
Post reply on HN