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

Function shouldRemainOnFallback

dash/deps/react-dom@18.3.1.js:20293–20311  ·  view source on GitHub ↗
(suspenseContext, current, workInProgress, renderLanes)

Source from the content-addressed store, hash-verified

20291
20292
20293 function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
20294 // If we're already showing a fallback, there are cases where we need to
20295 // remain on that fallback regardless of whether the content has resolved.
20296 // For example, SuspenseList coordinates when nested content appears.
20297 if (current !== null) {
20298 var suspenseState = current.memoizedState;
20299
20300 if (suspenseState === null) {
20301 // Currently showing content. Don't hide it, even if ForceSuspenseFallback
20302 // is true. More precise name might be "ForceRemainSuspenseFallback".
20303 // Note: This is a factoring smell. Can't remain on a fallback if there's
20304 // no fallback to remain on.
20305 return false;
20306 }
20307 } // Not currently showing content. Consult the Suspense context.
20308
20309
20310 return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
20311 }
20312
20313 function getRemainingWorkInPrimaryTree(current, renderLanes) {
20314 // TODO: Should not remove render lanes that were pinged during this render

Callers 1

updateSuspenseComponentFunction · 0.70

Calls 1

hasSuspenseContextFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…