From 052d16d0431d8328b11c0c8eb47081b5919c93ea Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 7 Nov 2018 13:42:32 -0800 Subject: [PATCH] Properly display memo components in the Profiler --- backend/attachRendererFiber.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/attachRendererFiber.js b/backend/attachRendererFiber.js index c7108b01ca..007bc9b48d 100644 --- a/backend/attachRendererFiber.js +++ b/backend/attachRendererFiber.js @@ -303,7 +303,7 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer): break; case MemoComponent: case SimpleMemoComponent: - nodeType = 'Special'; + nodeType = 'Composite'; if (elementType.displayName) { name = elementType.displayName; } else { @@ -476,6 +476,8 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer): case ClassComponent: case FunctionalComponent: case ContextConsumer: + case MemoComponent: + case SimpleMemoComponent: // For types that execute user code, we check PerformedWork effect. // We don't reflect bailouts (either referential or sCU) in DevTools. // eslint-disable-next-line no-bitwise