diff --git a/packages/react-reconciler/src/ReactDebugFiberPerf.js b/packages/react-reconciler/src/ReactDebugFiberPerf.js index ba238c49d1e9a..cc5dfc9ef6c00 100644 --- a/packages/react-reconciler/src/ReactDebugFiberPerf.js +++ b/packages/react-reconciler/src/ReactDebugFiberPerf.js @@ -121,8 +121,7 @@ const getFiberLabel = ( const getFiberName = (fiber: Fiber): string | null => { if (fiber.tag === SimpleMemoComponent) { - const innerName = getComponentName(fiber.type); - return `Memo${innerName !== null ? `(${innerName})` : ''}`; + return getComponentName(fiber.elementType); } return getComponentName(fiber.type); diff --git a/packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js b/packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js index 2474c58cfa4e2..ca5506965c72b 100644 --- a/packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactIncrementalPerf-test.internal.js @@ -573,9 +573,14 @@ describe('ReactDebugFiberPerf', () => { const MemoFoo = React.memo(function Foo() { return
; }); + const MemoBar = React.memo(function Bar() { + return ; + }); + MemoBar.displayName = 'NamedBar'; ReactNoop.render(