Skip to content

correctly acquire name of forward ref's react element fix: forwardRef#579

Closed
dvnrsn wants to merge 1 commit intoalgolia:masterfrom
CanopyTax:Devin/forwardRef
Closed

correctly acquire name of forward ref's react element fix: forwardRef#579
dvnrsn wants to merge 1 commit intoalgolia:masterfrom
CanopyTax:Devin/forwardRef

Conversation

@dvnrsn
Copy link
Copy Markdown

@dvnrsn dvnrsn commented Oct 19, 2020

No description provided.

const supportFragment = Boolean(Fragment);

const getReactElementDisplayName = (element: ReactElement<*>): string =>
(element.type.render && element.type.render.name) ||
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
In the case of a type react.forward_ref, the render has the name
image

@dvnrsn dvnrsn changed the title correctly acquire name of forward ref's react element correctly acquire name of forward ref's react element fix: forwardRef Oct 19, 2020
@Andarist
Copy link
Copy Markdown
Contributor

@armandabric I'm pretty sure that this can be closed now since #617 has landed

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.

3 participants