MCPcopy Create free account
hub / github.com/caseywebdev/react-list / updateSuspenseComponent

Function updateSuspenseComponent

docs/index.js:9479–9831  ·  view source on GitHub ↗
(current, workInProgress, renderLanes)

Source from the content-addressed store, hash-verified

9477 return current;
9478}
9479function updateSuspenseComponent(current, workInProgress, renderLanes) {
9480 var nextProps = workInProgress.pendingProps,
9481 showFallback = !1,
9482 didSuspend = 0 !== (workInProgress.flags & 128),
9483 JSCompiler_temp;
9484 (JSCompiler_temp = didSuspend) ||
9485 (JSCompiler_temp =
9486 null !== current && null === current.memoizedState
9487 ? !1
9488 : 0 !== (suspenseStackCursor.current & 2));
9489 JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));
9490 JSCompiler_temp = 0 !== (workInProgress.flags & 32);
9491 workInProgress.flags &= -33;
9492 if (null === current) {
9493 if (isHydrating) {
9494 showFallback
9495 ? pushPrimaryTreeSuspenseHandler(workInProgress)
9496 : reuseSuspenseHandlerOnStack(workInProgress);
9497 if (isHydrating) {
9498 var nextInstance = nextHydratableInstance,
9499 JSCompiler_temp$jscomp$0;
9500 if ((JSCompiler_temp$jscomp$0 = nextInstance)) {
9501 c: {
9502 JSCompiler_temp$jscomp$0 = nextInstance;
9503 for (
9504 nextInstance = rootOrSingletonContext;
9505 8 !== JSCompiler_temp$jscomp$0.nodeType;
9506
9507 ) {
9508 if (!nextInstance) {
9509 nextInstance = null;
9510 break c;
9511 }
9512 JSCompiler_temp$jscomp$0 = getNextHydratable(
9513 JSCompiler_temp$jscomp$0.nextSibling
9514 );
9515 if (null === JSCompiler_temp$jscomp$0) {
9516 nextInstance = null;
9517 break c;
9518 }
9519 }
9520 nextInstance = JSCompiler_temp$jscomp$0;
9521 }
9522 null !== nextInstance
9523 ? ((workInProgress.memoizedState = {
9524 dehydrated: nextInstance,
9525 treeContext:
9526 null !== treeContextProvider
9527 ? { id: treeContextId, overflow: treeContextOverflow }
9528 : null,
9529 retryLane: 536870912
9530 }),
9531 (JSCompiler_temp$jscomp$0 = createFiberImplClass(
9532 18,
9533 null,
9534 null,
9535 0
9536 )),

Callers 2

beginWorkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…