Skip to content
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

fix object assign name #247

Merged
merged 1 commit into from
Feb 19, 2021
Merged

fix object assign name #247

merged 1 commit into from
Feb 19, 2021

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Feb 19, 2021

When using the forwardRef, utility we loose the information like Component.name, to fix this I added the name to the result of the forwardRef. That said, this causes build errors in certain scenario's (see #246).

This PR will fix that by applying displayName instead.

This allows us to read a custom `displayName`, and we can default to a
`name`. React Devtools will still be able to read this information.

Fixes: #246
@vercel
Copy link

vercel bot commented Feb 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/@headlessui-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/ot5a5xoig
✅ Preview: https://headlessui-react-git-fix-object-assign-name.tailwindlabs.vercel.app

headlessui-vue – ./packages/@headlessui-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/qlh7bfccs
✅ Preview: https://headlessui-vue-git-fix-object-assign-name.tailwindlabs.vercel.app

@RobinMalfait RobinMalfait changed the base branch from main to develop February 19, 2021 12:17
@RobinMalfait RobinMalfait merged commit a94cc79 into develop Feb 19, 2021
@RobinMalfait RobinMalfait deleted the fix-object-assign-name branch February 19, 2021 12:22
This was referenced Feb 23, 2021
This was referenced Mar 15, 2021
RobinMalfait added a commit that referenced this pull request Mar 22, 2021
This allows us to read a custom `displayName`, and we can default to a
`name`. React Devtools will still be able to read this information.

Fixes: #246
RobinMalfait added a commit that referenced this pull request Mar 26, 2021
This allows us to read a custom `displayName`, and we can default to a
`name`. React Devtools will still be able to read this information.

Fixes: #246
RobinMalfait added a commit that referenced this pull request Apr 2, 2021
This allows us to read a custom `displayName`, and we can default to a
`name`. React Devtools will still be able to read this information.

Fixes: #246
RobinMalfait added a commit that referenced this pull request Apr 2, 2021
This allows us to read a custom `displayName`, and we can default to a
`name`. React Devtools will still be able to read this information.

Fixes: #246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant