commitCachePassiveMountEffect() — react Function Reference
Architecture documentation for the commitCachePassiveMountEffect() function in ReactFiberCommitWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD b2abac0a_b636_f5de_817a_0aad16ff6bc1["commitCachePassiveMountEffect()"] e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"] b2abac0a_b636_f5de_817a_0aad16ff6bc1 -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544 07f3c6d9_2fce_51ae_4408_e0d4ab7359a1["commitPassiveMountOnFiber()"] 07f3c6d9_2fce_51ae_4408_e0d4ab7359a1 -->|calls| b2abac0a_b636_f5de_817a_0aad16ff6bc1 c3c0c008_f543_54ba_5f17_334454e50793["reconnectPassiveEffects()"] c3c0c008_f543_54ba_5f17_334454e50793 -->|calls| b2abac0a_b636_f5de_817a_0aad16ff6bc1 4ec30fe0_df47_e5db_0cf4_f03d14801fdc["commitAtomicPassiveEffects()"] 4ec30fe0_df47_e5db_0cf4_f03d14801fdc -->|calls| b2abac0a_b636_f5de_817a_0aad16ff6bc1 9b153302_815a_1f5e_73cd_e59240aaf8f6["retainCache()"] b2abac0a_b636_f5de_817a_0aad16ff6bc1 -->|calls| 9b153302_815a_1f5e_73cd_e59240aaf8f6 403ebde6_eb4f_5227_0cbf_8f26881eabc7["releaseCache()"] b2abac0a_b636_f5de_817a_0aad16ff6bc1 -->|calls| 403ebde6_eb4f_5227_0cbf_8f26881eabc7 style b2abac0a_b636_f5de_817a_0aad16ff6bc1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCommitWork.js lines 3454–3474
function commitCachePassiveMountEffect(
current: Fiber | null,
finishedWork: Fiber,
) {
let previousCache: Cache | null = null;
if (finishedWork.alternate !== null) {
previousCache = finishedWork.alternate.memoizedState.cache;
}
const nextCache = finishedWork.memoizedState.cache;
// Retain/release the cache. In theory the cache component
// could be "borrowing" a cache instance owned by some parent,
// in which case we could avoid retaining/releasing. But it
// is non-trivial to determine when that is the case, so we
// always retain/release.
if (nextCache !== previousCache) {
retainCache(nextCache);
if (previousCache != null) {
releaseCache(previousCache);
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does commitCachePassiveMountEffect() do?
commitCachePassiveMountEffect() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is commitCachePassiveMountEffect() defined?
commitCachePassiveMountEffect() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 3454.
What does commitCachePassiveMountEffect() call?
commitCachePassiveMountEffect() calls 2 function(s): releaseCache, retainCache.
What calls commitCachePassiveMountEffect()?
commitCachePassiveMountEffect() is called by 3 function(s): commitAtomicPassiveEffects, commitPassiveMountOnFiber, reconnectPassiveEffects.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free