Hacker News new | past | comments | ask | show | jobs | submit login

I think he may have wondered how would, say a Python backend using Resend Python SDK, render a React Email template and send it. Their API docs [1] for "Send Email" has an option for specifying a 'react' component to render the message but it's only available on the NodeJS SDK. Otherwise you pass HTML and/or Text.

Personally, I was expecting the api to optionally accept a React Template, along with the Data, where upon the Resend api would Render it (or fail) then Send it. Passing a 'preview' param would return the rendered HTML/Text (for testing) - just a thought.

[1] https://resend.com/docs/api-reference/emails/send-email




Exactly this.

Said differently - how many devs out there are screaming "I really need to send transactional email via React", when most apps are sending it via Python, Ruby, PHP, Java, and (back-end) JS.


Preface: I'm with you on this.

But I think the targeting here is for a certain generation of companies where there is a very distinct backend/frontend split OR companies where everyone is a JavaScript dev (and the backend is Node). The backend folks send the email content and the frontend folks are responsible for building the presentation-layer stuff. The thinking here, I believe, is that those frontend guys do all their other work in React, so when they're given these transactional emails to build, they'd prefer to keep working in React. I think?


I think you’re conflating terms (or possibly concepts) here. This isn’t about sending emails via React; this is about sending HTML emails generated from React components via a backend. The examples shown on the landing page are of Node.js, Next.js route handlers and Remix loader functions, the latter two being fancy abstractions over Lambda functions (or isolates).

I agree that sending an email from React doesn’t make a lot of sense, but that’s not the target at which this is aiming.


Er, you can send the emails via whatever backend service you want. React merely acts as a templating language and when compiled down to HTML, you can then send the resultant file with Python, NodeJS, etc.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: