-
Notifications
You must be signed in to change notification settings - Fork 864
chore: Add forward ref to all relevant components #1294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gabrielmfern
merged 19 commits into
canary
from
chore/add-forward-ref-to-all-components
Jun 25, 2024
Merged
chore: Add forward ref to all relevant components #1294
gabrielmfern
merged 19 commits into
canary
from
chore/add-forward-ref-to-all-components
Jun 25, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Member
Author
|
Converting to draft as it seems like Tailwind's media queries are failing here |
eea0258 to
e5d2948
Compare
|
+1 to this, would love ref support. using react-email with craft.js for visual building of emails. |
|
Would love to see that in the next version release. I truly need this. |
bcff8d9 to
2f94b3d
Compare
vcapretz
approved these changes
Jun 20, 2024
…missing `ref` prop
05b57a9 to
9ca8599
Compare
gabrielmfern
added a commit
that referenced
this pull request
Jul 1, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 1, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 3, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 3, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 3, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 5, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 5, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 5, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 8, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 15, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 17, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 19, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 23, 2024
gabrielmfern
added a commit
that referenced
this pull request
Jul 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our rendering utility is meant to be optional. This comes from our apparent philosophy. Things should be flexible and minimal, from where I see it.
If we are to act on that idea, we need to pay attention to something that is in a few use cases crucial for users: being able to use
refs with our components.Not forwarding them means that we don't really support all kinds of rendering, but only the static ones.
If the user intends to build something for themselves that is meant to render the email
components in the browser itself with reactivity we shouldn't have something opposing them.
That is not to say that having the
refs here is not confusing, but I'd like to argue thatit is going to be very hard to come across the
refunless the user actually wants itbecause of all the common element props that we already forward into all the internal elements of our components.
That being said we probably should also add something in our documentation talking about this
and making this clear, open to any ideas of where to put it. My initial thought is to mention
this idea in a page that explains the philosophy of React Email which might be a great idea to have.
Thanks to @advancedtw for bringing this to our attention on #1286.