Skip to content

Commit

Permalink
acquire and show the displayName if set on ForwardRef
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Sep 12, 2018
1 parent 0b9fc7f commit 2bc394c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/attachRendererFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer):
case ForwardRefLazy:
const functionName = getDisplayName(resolvedType.render, '');
nodeType = 'Special';
name = functionName !== '' ? `ForwardRef(${functionName})` : 'ForwardRef';
name = resolvedType.displayName || (
functionName !== ''
? `ForwardRef(${functionName})`
: 'ForwardRef'
);
children = [];
break;
case HostRoot:
Expand Down

0 comments on commit 2bc394c

Please sign in to comment.