Having worked on a number of product email systems where you have an existing codebase, while not exactly intuitive this is basically exactly what I've wanted. You can easily code share environment-agnostic code with your frontend (Things like user-facing text formatting, localization, handling of commonly shaped API objects like users, generating links to specific pages.)
It also leans into a lot of email code best practices. Clear inputs and outputs and unidirectional data flow with React props, building reusable and composable components that work in all email clients without having to hand-rewrite table tags, and an easy way to inject test data or build out email templates before you have real data.
I've used react-email on one project now, and would happily re-use it in a future project where a team is amenable to having some TypeScript in their backend.
My one complaint / feature request is that it'd be really nice to have a way to basically "export" react-email into low or no dependency functions, since effectively all it's doing at the end of the day is providing you a function where you pass it an object, and it returns a string.
It also leans into a lot of email code best practices. Clear inputs and outputs and unidirectional data flow with React props, building reusable and composable components that work in all email clients without having to hand-rewrite table tags, and an easy way to inject test data or build out email templates before you have real data.
I've used react-email on one project now, and would happily re-use it in a future project where a team is amenable to having some TypeScript in their backend.
My one complaint / feature request is that it'd be really nice to have a way to basically "export" react-email into low or no dependency functions, since effectively all it's doing at the end of the day is providing you a function where you pass it an object, and it returns a string.