commitHookLayoutEffects() — react Function Reference
Architecture documentation for the commitHookLayoutEffects() function in ReactFiberCommitEffects.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66["commitHookLayoutEffects()"] 8f5342bb_933e_6410_b584_cc120047394a["ReactFiberCommitEffects.js"] a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 -->|defined in| 8f5342bb_933e_6410_b584_cc120047394a ce61aa22_42d2_811a_b317_96c8d0cb0321["commitLayoutEffectOnFiber()"] ce61aa22_42d2_811a_b317_96c8d0cb0321 -->|calls| a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 1846396a_6bcb_7ad4_8180_1d20ef2960a4["reappearLayoutEffects()"] 1846396a_6bcb_7ad4_8180_1d20ef2960a4 -->|calls| a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 c4d9a9cc_f5a1_3cd7_8ada_0c662e173d45["shouldProfile()"] a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 -->|calls| c4d9a9cc_f5a1_3cd7_8ada_0c662e173d45 9fd588c7_bccc_26bc_b726_517f00094e4a["commitHookEffectListMount()"] a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 -->|calls| 9fd588c7_bccc_26bc_b726_517f00094e4a style a9dc2423_dea6_d2a0_0ec6_d7730bfd6c66 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCommitEffects.js lines 97–112
export function commitHookLayoutEffects(
finishedWork: Fiber,
hookFlags: HookFlags,
) {
// At this point layout effects have already been destroyed (during mutation phase).
// This is done to prevent sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
if (shouldProfile(finishedWork)) {
startEffectTimer();
commitHookEffectListMount(hookFlags, finishedWork);
recordEffectDuration(finishedWork);
} else {
commitHookEffectListMount(hookFlags, finishedWork);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does commitHookLayoutEffects() do?
commitHookLayoutEffects() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitEffects.js.
Where is commitHookLayoutEffects() defined?
commitHookLayoutEffects() is defined in packages/react-reconciler/src/ReactFiberCommitEffects.js at line 97.
What does commitHookLayoutEffects() call?
commitHookLayoutEffects() calls 2 function(s): commitHookEffectListMount, shouldProfile.
What calls commitHookLayoutEffects()?
commitHookLayoutEffects() is called by 2 function(s): commitLayoutEffectOnFiber, reappearLayoutEffects.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free