Replies: 3 comments 1 reply
-
Wow, this is actually a really good idea for a new API actually. For some time we wanted to allow the const { html, plainText, attachments, subject } = render(<MyTemplate />); |
Beta Was this translation helpful? Give feedback.
1 reply
-
@gabrielmfern, for migrate from SendGrid templates to react.email, i really need this feature. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I love this idea, I would like to contribute on this. If we haven't started already ❤️ . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Be able to support the subject line inside of React Email components the same way that preview text is supported.
Background
Preview text is already supported within React Email like this:
It would be really neat if the subject line was also supported:
Proposal
Like above ☝️. The render call can then be tweaked with:
import { MyTemplate } from './email'; import { render } from '@react-email/render'; const text = render(<MyTemplate />, { plainText: true, + subject: true, });
or it could be altered to something like:
Although, that's a breaking change and the variable names are subjective.
Beta Was this translation helpful? Give feedback.
All reactions