react-is#ForwardRef JavaScript Examples
The following examples show how to use
react-is#ForwardRef.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: hydration.js From ReactSourceCodeAnalyze with MIT License | 6 votes |
export function getDisplayNameForReactElement(
element: React$Element<any>,
): string | null {
const elementType = typeOf(element);
switch (elementType) {
case AsyncMode:
case ConcurrentMode:
return 'ConcurrentMode';
case ContextConsumer:
return 'ContextConsumer';
case ContextProvider:
return 'ContextProvider';
case ForwardRef:
return 'ForwardRef';
case Fragment:
return 'Fragment';
case Lazy:
return 'Lazy';
case Memo:
return 'Memo';
case Portal:
return 'Portal';
case Profiler:
return 'Profiler';
case StrictMode:
return 'StrictMode';
case Suspense:
return 'Suspense';
default:
const {type} = element;
if (typeof type === 'string') {
return type;
} else if (type != null) {
return getDisplayName(type, 'Anonymous');
} else {
return 'Element';
}
}
}
Example #2
Source File: index.js From Path-Finding-Visualizer with MIT License | 5 votes |
TYPE_STATICS[ForwardRef] = FORWARD_REF_STATICS;
Example #3
Source File: index.js From spring-boot-ecommerce with Apache License 2.0 | 5 votes |
TYPE_STATICS[ForwardRef] = FORWARD_REF_STATICS;
Example #4
Source File: styled-components.browser.esm.js From the-eye-knows-the-garbage with MIT License | 5 votes |
TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[ForwardRef] = {
$$typeof: true,
render: true
}, _TYPE_STATICS)
Example #5
Source File: styled-components.esm.js From the-eye-knows-the-garbage with MIT License | 5 votes |
TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[ForwardRef] = {
$$typeof: true,
render: true
}, _TYPE_STATICS)