Skip to content

Commit d5e7224

Browse files
committed
Devtool: $r should contain hooks property when it is forwardRef or memo component
1 parent 2e948e0 commit d5e7224

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-devtools-shared/src/backend/renderer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,13 +2795,15 @@ export function attach(
27952795
break;
27962796
case ForwardRef:
27972797
global.$r = {
2798+
hooks,
27982799
props,
27992800
type: type.render,
28002801
};
28012802
break;
28022803
case MemoComponent:
28032804
case SimpleMemoComponent:
28042805
global.$r = {
2806+
hooks,
28052807
props,
28062808
type:
28072809
elementType != null && elementType.type != null

0 commit comments

Comments
 (0)