@samitouri / QOS-React-2 / commits / f0031dc6ed

Devtool: `$r` should contain `hooks` property when it is forwardRef or memo component (#20626)

Berton Zhu committed Jan 25, 2021 at 23:35 UTC f0031dc6ed8801cc638c2f378911a93ceb8e2412
1 file changed +2
packages/react-devtools-shared/src/backend/renderer.js
+2
@@ -2795,6 +2795,7 @@ export function attach(
2795 break;
2796 case ForwardRef:
2797 global.$r = {
2798 + hooks,
2799 props,
2800 type: type.render,
2801 };
@@ -2802,6 +2803,7 @@ export function attach(
2803 case MemoComponent:
2804 case SimpleMemoComponent:
2805 global.$r = {
2806 + hooks,
2807 props,
2808 type:
2809 elementType != null && elementType.type != null