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

acquire and show the displayName if set on ForwardRef #1154

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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