-
Notifications
You must be signed in to change notification settings - Fork 47k
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
displayName not supported in combination with forwardRef in "React Developer Tools" #13703
Comments
Check out the docs: The function you pass to const MyComponent = React.forwardRef(function nameThisThing(props, ref) {
return "[MyComponent]";
}); Updated code: https://codesandbox.io/s/oqy4q045qy |
Oooops, like always: It helps if you can read ;-) |
No worries. Looks like an easy mistake to make! |
The display names of components that are based on React.forwardRef are currently ignored in "React Developer Tools" (=> name is always "ForwardRef" ).
I think this is a bug.
Example:
Edit:
https://jsbin.com/nutetosaxu/edit?html,js,output
Preview:
https://jsbin.com/nutetosaxu
The text was updated successfully, but these errors were encountered: