We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Consider the following code:
const forwardRefComponentLike = function forwardRefComponentLike(_props, _ref) { return <span>FowardRef</span>; }; const FowardRefComponent = React.forwardRef(forwardRefComponentLike, {}); const MemoOfFowardRefComponent = React.memo(FowardRefComponent);
The MemoOfFowardRefComponent component does not pick up the name of the ForwardRefComponent and is instead rendered in devtools as:
MemoOfFowardRefComponent
Anonymous [Memo] forwardRefComponentLike [ForwardRef]
See this codesandbox for a demo and a comparison of how React.memo handles regular functional components: https://codesandbox.io/s/react-forwardref-and-memo-combo-33vx7
What is the expected behavior?
I would expect this to pick up the name of the thing passed into React.Memo, as happens for regular components
forwardRefComponentLike [Memo]
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Tested with React 16.9.0.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Consider the following code:
The
MemoOfFowardRefComponent
component does not pick up the name of the ForwardRefComponent and is instead rendered in devtools as:See this codesandbox for a demo and a comparison of how React.memo handles regular functional components: https://codesandbox.io/s/react-forwardref-and-memo-combo-33vx7
What is the expected behavior?
I would expect this to pick up the name of the thing passed into React.Memo, as happens for regular components
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Tested with React 16.9.0.
The text was updated successfully, but these errors were encountered: