Skip to content

memo components show as Unknown in the timings section of Chrome #15897

@xaviergonz

Description

@xaviergonz

Do you want to request a feature or report a bug?
bug report

What is the current behavior?

Given a component like

export const MyComponent = (p) => {...};
MyComponent.displayName = "MyComponent";

it shows properly as
image

but as soon as memo is added

export const MyComponent = memo((p) => {...});
MyComponent.displayName = "MyComponent";

it shows as Unknown instead
image

Note that both actually show properly on the tree explorer, the issue is only in the timings section of a performance recording in chrome.

What is the expected behavior?

It should show the proper name on the timings when memo is used

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Windows 10, Chrome 74, React 16.8.x (the latest version that was available on April 26)

This issue got copied from react devtools repo since @bvaughn suggested it was actually a react bug
facebook/react-devtools#1340

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: StaleAutomatically closed due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions