Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
acquire and show the displayName if set on ForwardRef (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor authored and bvaughn committed Sep 27, 2018
1 parent 6f91f84 commit 69d137c
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 @@ -194,7 +194,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 69d137c

Please sign in to comment.