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
  • Loading branch information
meowtec committed Jan 20, 2021
1 parent 2e948e0 commit d5e7224
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 d5e7224

Please sign in to comment.