MCPcopy Index your code
hub / github.com/plotly/dash / isValidElementType

Function isValidElementType

dash/deps/react@18.2.0.js:1514–1535  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

1512 }
1513
1514 function isValidElementType(type) {
1515 if (typeof type === 'string' || typeof type === 'function') {
1516 return true;
1517 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1518
1519
1520 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
1521 return true;
1522 }
1523
1524 if (typeof type === 'object' && type !== null) {
1525 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1526 // types supported by any Flight configuration anywhere since
1527 // we don't know which Flight build this will end up being used
1528 // with.
1529 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1530 return true;
1531 }
1532 }
1533
1534 return false;
1535 }
1536
1537 function memo(type, compare) {
1538 {

Callers 2

memoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…