-
Notifications
You must be signed in to change notification settings - Fork 778
fix(tailwind): React.forwardRef components not working #1335
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@nzben is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
Can you also run |
@nzben Could you check the "Allow edits and access to secrets by mantainers" option? This is so that I can fix the conflicts here. Wanted to get this one merged. |
@gabrielmfern weirdly, I don't see that option :( I'll try to merge upstream and fix the conflict. |
@nzben You can also try reopening the PR here, from the same branch and fork, with the option checked so that I can fix the conflicts. |
Should be good to go now @gabrielmfern |
Thank you so much @nzben. Just merged it, will release in a few. Loved this PR, feel free to open other ones if you find the need to 🥰 |
We were finding that some components in our UI library were not being correctly rendered.
On investigation it appears that in a couple of places in the Tailwind component, there's a check to see if the child is a functional component. For example:
react-email/packages/tailwind/src/tailwind.tsx
Line 93 in e72d089
When using React.forwardRef, the child appears as an
object
with arender
function, which was failing this test.Unsure if there's a better option, but this PR expands the check to also see if the child has a
render
function and uses that instead of the child itself.