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

Function preloadResourceAndSuspendIfNeeded

docs/index.js:13099–13120  ·  view source on GitHub ↗
(workInProgress, resource)

Source from the content-addressed store, hash-verified

13097 workInProgress.flags |= 4;
13098}
13099function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
13100 if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
13101 workInProgress.flags &= -16777217;
13102 else if (((workInProgress.flags |= 16777216), !preloadResource(resource))) {
13103 resource = suspenseHandlerStackCursor.current;
13104 if (
13105 null !== resource &&
13106 ((workInProgressRootRenderLanes & 4194176) ===
13107 workInProgressRootRenderLanes
13108 ? null !== shellBoundary
13109 : ((workInProgressRootRenderLanes & 62914560) !==
13110 workInProgressRootRenderLanes &&
13111 0 === (workInProgressRootRenderLanes & 536870912)) ||
13112 resource !== shellBoundary)
13113 )
13114 throw (
13115 ((suspendedThenable = noopSuspenseyCommitThenable),
13116 SuspenseyCommitException)
13117 );
13118 workInProgress.flags |= 8192;
13119 }
13120}
13121function scheduleRetryEffect(workInProgress, retryQueue) {
13122 null !== retryQueue && (workInProgress.flags |= 4);
13123 workInProgress.flags & 16384 &&

Callers 1

completeWorkFunction · 0.85

Calls 1

preloadResourceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…