Skip to content

Commit

Permalink
Devtool: $r should contain hooks property when it is forwardRef o…
Browse files Browse the repository at this point in the history
…r memo component (facebook#20626)
  • Loading branch information
meowtec authored and koto committed Jun 15, 2021
1 parent 8d74cbc commit 361619a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-devtools-shared/src/backend/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2795,13 +2795,15 @@ export function attach(
break;
case ForwardRef:
global.$r = {
hooks,
props,
type: type.render,
};
break;
case MemoComponent:
case SimpleMemoComponent:
global.$r = {
hooks,
props,
type:
elementType != null && elementType.type != null
Expand Down

0 comments on commit 361619a

Please sign in to comment.