Faire / mjml-react

React component library to generate the HTML emails on the fly
https://www.npmjs.com/package/@faire/mjml-react
MIT License
375 stars 16 forks source link

MjmlInclude #91

Closed paulocf92 closed 1 year ago

paulocf92 commented 1 year ago

Does this port support MjmlInclude? Would you guys have any example or would it be better to simply include a React component?

IanEdington commented 1 year ago

Yes, you can import MjmlInclude and it will be converted to an mjml-include tag in the mjml output. You use it the same way it's used in mjml.

MjmlInclude is very handy when you're transitioning from .mjml files to mjml in react. However, if you're building a new email I would strongly suggest using react components. They are MUCH more flexible and there's no downside to using them over MjmlInclude unless you have some emails in .mjml and others in .tsx.

paulocf92 commented 1 year ago

That's just what I thought as well, components are much more flexible.

Thank you so much!