MCPcopy Create free account
hub / github.com/plotly/dash / createFiberFromTypeAndProps

Function createFiberFromTypeAndProps

dash/deps/react-dom@18.3.1.js:28373–28503  ·  view source on GitHub ↗
(type, // React$ElementType
  key, pendingProps, owner, mode, lanes)

Source from the content-addressed store, hash-verified

28371 return createFiber(HostRoot, null, null, mode);
28372 }
28373 function createFiberFromTypeAndProps(type, // React$ElementType
28374 key, pendingProps, owner, mode, lanes) {
28375 var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
28376
28377 var resolvedType = type;
28378
28379 if (typeof type === 'function') {
28380 if (shouldConstruct$1(type)) {
28381 fiberTag = ClassComponent;
28382
28383 {
28384 resolvedType = resolveClassForHotReloading(resolvedType);
28385 }
28386 } else {
28387 {
28388 resolvedType = resolveFunctionForHotReloading(resolvedType);
28389 }
28390 }
28391 } else if (typeof type === 'string') {
28392 fiberTag = HostComponent;
28393 } else {
28394 getTag: switch (type) {
28395 case REACT_FRAGMENT_TYPE:
28396 return createFiberFromFragment(pendingProps.children, mode, lanes, key);
28397
28398 case REACT_STRICT_MODE_TYPE:
28399 fiberTag = Mode;
28400 mode |= StrictLegacyMode;
28401
28402 if ( (mode & ConcurrentMode) !== NoMode) {
28403 // Strict effects should never run on legacy roots
28404 mode |= StrictEffectsMode;
28405 }
28406
28407 break;
28408
28409 case REACT_PROFILER_TYPE:
28410 return createFiberFromProfiler(pendingProps, mode, lanes, key);
28411
28412 case REACT_SUSPENSE_TYPE:
28413 return createFiberFromSuspense(pendingProps, mode, lanes, key);
28414
28415 case REACT_SUSPENSE_LIST_TYPE:
28416 return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
28417
28418 case REACT_OFFSCREEN_TYPE:
28419 return createFiberFromOffscreen(pendingProps, mode, lanes, key);
28420
28421 case REACT_LEGACY_HIDDEN_TYPE:
28422
28423 // eslint-disable-next-line no-fallthrough
28424
28425 case REACT_SCOPE_TYPE:
28426
28427 // eslint-disable-next-line no-fallthrough
28428
28429 case REACT_CACHE_TYPE:
28430

Callers 3

updateMemoComponentFunction · 0.70
beginWorkFunction · 0.70
createFiberFromElementFunction · 0.70

Calls 12

keysMethod · 0.80
shouldConstruct$1Function · 0.70
createFiberFromFragmentFunction · 0.70
createFiberFromProfilerFunction · 0.70
createFiberFromSuspenseFunction · 0.70
createFiberFromOffscreenFunction · 0.70
createFiberFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…