MCPcopy
hub / github.com/facebook/react / getWrappedDisplayName

Function getWrappedDisplayName

packages/react-devtools-shared/src/utils.js:134–144  ·  view source on GitHub ↗
(
  outerType: mixed,
  innerType: any,
  wrapperName: string,
  fallbackName?: string,
)

Source from the content-addressed store, hash-verified

132
133// Mirror https://github.com/facebook/react/blob/7c21bf72ace77094fd1910cc350a548287ef8350/packages/shared/getComponentName.js#L27-L37
134export function getWrappedDisplayName(
135 outerType: mixed,
136 innerType: any,
137 wrapperName: string,
138 fallbackName?: string,
139): string {
140 const displayName = (outerType: any)?.displayName;
141 return (
142 displayName || `${wrapperName}(${getDisplayName(innerType, fallbackName)})`
143 );
144}
145
146export function getDisplayName(
147 type: Function,

Callers 1

getDisplayNameForFiberFunction · 0.90

Calls 1

getDisplayNameFunction · 0.85

Tested by

no test coverage detected