-
Notifications
You must be signed in to change notification settings - Fork 49k
Closed
Labels
Component: Developer ToolsStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bugType: Discussion
Description
Given
const StyleDiv = forwardRef(function Component({ children }, ref) {
return <div ref={ref}>{children}</div>;
});
StyleDiv.displayName = `styled(connected(div))`;
-- https://codesandbox.io/s/little-sky-y8h1b?file=/src/App.js
I would expect that the badges from the display name are prioritized in the component tree.
However, devtools currently displays the ForwardRef
badge first:
Oddly enough, the inline devtools in codesandbox do prioritize the badge from the displayName
(maybe this regressed?):
There's also an argument to be made that devtools should not display the ForwardRef
badge to begin with (since we explicitly omitted it in displayName
). That can be discussed separately but would solve the issue entirely.
Metadata
Metadata
Assignees
Labels
Component: Developer ToolsStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bugType: Discussion