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 (#20626)
  • Loading branch information
meowtec authored Jan 25, 2021
1 parent 895ae67 commit f0031dc
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 f0031dc

Please sign in to comment.