MCPcopy Create free account
hub / github.com/microsoft/SandDance / resolveLazyComponentTag

Function resolveLazyComponentTag

docs/external/js/react-dom.development.js:23810–23826  ·  view source on GitHub ↗
(Component)

Source from the content-addressed store, hash-verified

23808 return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
23809 }
23810 function resolveLazyComponentTag(Component) {
23811 if (typeof Component === 'function') {
23812 return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
23813 } else if (Component !== undefined && Component !== null) {
23814 var $$typeof = Component.$$typeof;
23815
23816 if ($$typeof === REACT_FORWARD_REF_TYPE) {
23817 return ForwardRef;
23818 }
23819
23820 if ($$typeof === REACT_MEMO_TYPE) {
23821 return MemoComponent;
23822 }
23823 }
23824
23825 return IndeterminateComponent;
23826 } // This is used to create an alternate fiber to do work on.
23827
23828 function createWorkInProgress(current, pendingProps) {
23829 var workInProgress = current.alternate;

Callers 1

mountLazyComponentFunction · 0.85

Calls 1

shouldConstructFunction · 0.85

Tested by

no test coverage detected