You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Components wrapped in React.memo don't have a display name in the "components" tab of React DevTools.
React version: 16.13
Steps To Reproduce
create a component that uses React.memo
name the component using "displayName"
open DevTools
the component will not use the name from step 2
constTest=React.memo(({ message })=>{return<h1>{message}</h1>;});Test.displayName="Foo";// Will be displayed as "Anonymous"functionApp(){return(<Testmessage="Hi"/>);}
The current behavior
Memos ignore "displayName" in React DevTools
The expected behavior
Memos show "displayName" in React DevTools
The text was updated successfully, but these errors were encountered:
lxender
changed the title
Bug: React Devtools ignore displayName on React.memo components
Bug: React DevTools ignores displayName on React.memo components
Feb 27, 2020
Components wrapped in React.memo don't have a display name in the "components" tab of React DevTools.
React version: 16.13
Steps To Reproduce
The current behavior
Memos ignore "displayName" in React DevTools
The expected behavior
Memos show "displayName" in React DevTools
The text was updated successfully, but these errors were encountered: