attachSuspenseRetryListeners() — react Function Reference
Architecture documentation for the attachSuspenseRetryListeners() function in ReactFiberCommitWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD bd37539a_04dd_f907_2b26_c1af02700bd0["attachSuspenseRetryListeners()"] e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"] bd37539a_04dd_f907_2b26_c1af02700bd0 -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544 bc4a6de9_07dc_eca7_681a_10f692e08483["commitMutationEffectsOnFiber()"] bc4a6de9_07dc_eca7_681a_10f692e08483 -->|calls| bd37539a_04dd_f907_2b26_c1af02700bd0 f2f910f8_bae4_e6a4_3408_3b1560086b4a["getRetryCache()"] bd37539a_04dd_f907_2b26_c1af02700bd0 -->|calls| f2f910f8_bae4_e6a4_3408_3b1560086b4a style bd37539a_04dd_f907_2b26_c1af02700bd0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCommitWork.js lines 1932–1962
function attachSuspenseRetryListeners(
finishedWork: Fiber,
wakeables: RetryQueue,
) {
// If this boundary just timed out, then it will have a set of wakeables.
// For each wakeable, attach a listener so that when it resolves, React
// attempts to re-render the boundary in the primary (pre-timeout) state.
const retryCache = getRetryCache(finishedWork);
wakeables.forEach(wakeable => {
// Memoize using the boundary fiber to prevent redundant listeners.
if (!retryCache.has(wakeable)) {
retryCache.add(wakeable);
if (enableUpdaterTracking) {
if (isDevToolsPresent) {
if (inProgressLanes !== null && inProgressRoot !== null) {
// If we have pending work still, associate the original updaters with it.
restorePendingUpdaters(inProgressRoot, inProgressLanes);
} else {
throw Error(
'Expected finished root and lanes to be set. This is a bug in React.',
);
}
}
}
const retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
wakeable.then(retry, retry);
}
});
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does attachSuspenseRetryListeners() do?
attachSuspenseRetryListeners() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is attachSuspenseRetryListeners() defined?
attachSuspenseRetryListeners() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 1932.
What does attachSuspenseRetryListeners() call?
attachSuspenseRetryListeners() calls 1 function(s): getRetryCache.
What calls attachSuspenseRetryListeners()?
attachSuspenseRetryListeners() is called by 1 function(s): commitMutationEffectsOnFiber.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free