We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
React.forwardRef creates an object with a rendering function moved to a .render property (see here).
React.forwardRef
function forwardRef(render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render, }; }
I'd suggest to use react-is package and copy logic from React's shared/getComponentNameFromType.js
import { isForwardRef } from "react-is"; function getWrappedName( outerType: mixed, innerType: any, ): string { const displayName = (outerType: any).displayName; if (displayName) { return displayName; } return innerType.displayName || innerType.name || 'No Display Name'; } const getReactElementDisplayName = (element: mixed): string => { if (isForwardRef(element)) { return getWrappedName(element, (element as any).type); } // .. .etc };
The text was updated successfully, but these errors were encountered:
This should be fixed by #617. Let me know if this is not the case. Meanwhile I'm closing this issue.
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
React.forwardRef
creates an object with a rendering function moved to a .render property (see here).I'd suggest to use react-is package and copy logic from React's shared/getComponentNameFromType.js
The text was updated successfully, but these errors were encountered: