Skip to content

Commit 6d668b1

Browse files
committed
Fix conflicts for #86
1 parent 4068e55 commit 6d668b1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/click-to-react-component/src/getDisplayNameFromReactInstance.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ export function getDisplayNameForInstance(instance) {
4747
return 'SuspenseComponent'
4848

4949
case 14:
50-
return 'MemoComponent'
51-
52-
case 15: // SimpleMemoComponent
50+
case 15:
5351
// Attempt to get name from wrapped component
54-
return elementType.type.name ?? 'MemoComponent'
52+
return (
53+
elementType.type?.name ??
54+
Symbol.keyFor?.(elementType.$$typeof) ??
55+
'React.memo'
56+
)
5557

5658
case 16: // LazyComponent
5759
return 'React.lazy'

0 commit comments

Comments
 (0)