getRetryCache() — react Function Reference
Architecture documentation for the getRetryCache() function in ReactFiberCommitWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f2f910f8_bae4_e6a4_3408_3b1560086b4a["getRetryCache()"] e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"] f2f910f8_bae4_e6a4_3408_3b1560086b4a -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544 bd37539a_04dd_f907_2b26_c1af02700bd0["attachSuspenseRetryListeners()"] bd37539a_04dd_f907_2b26_c1af02700bd0 -->|calls| f2f910f8_bae4_e6a4_3408_3b1560086b4a style f2f910f8_bae4_e6a4_3408_3b1560086b4a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCommitWork.js lines 1901–1930
function getRetryCache(finishedWork: Fiber) {
// TODO: Unify the interface for the retry cache so we don't have to switch
// on the tag like this.
switch (finishedWork.tag) {
case ActivityComponent:
case SuspenseComponent:
case SuspenseListComponent: {
let retryCache = finishedWork.stateNode;
if (retryCache === null) {
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
}
return retryCache;
}
case OffscreenComponent: {
const instance: OffscreenInstance = finishedWork.stateNode;
let retryCache: null | Set<Wakeable> | WeakSet<Wakeable> =
instance._retryCache;
if (retryCache === null) {
retryCache = instance._retryCache = new PossiblyWeakSet();
}
return retryCache;
}
default: {
throw new Error(
`Unexpected Suspense handler tag (${finishedWork.tag}). This is a ` +
'bug in React.',
);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getRetryCache() do?
getRetryCache() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is getRetryCache() defined?
getRetryCache() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 1901.
What calls getRetryCache()?
getRetryCache() is called by 1 function(s): attachSuspenseRetryListeners.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free