doesRequireClone() — react Function Reference
Architecture documentation for the doesRequireClone() function in ReactFiberCompleteWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD b22571f1_f869_ca60_b928_0a21847aa17b["doesRequireClone()"] 6b05669d_2f09_63a5_e79f_0afc195f25a3["ReactFiberCompleteWork.js"] b22571f1_f869_ca60_b928_0a21847aa17b -->|defined in| 6b05669d_2f09_63a5_e79f_0afc195f25a3 3cccd78e_6f36_bda1_da89_ea302f4aca1a["updateHostContainer()"] 3cccd78e_6f36_bda1_da89_ea302f4aca1a -->|calls| b22571f1_f869_ca60_b928_0a21847aa17b 17f65ca7_1e68_0419_b46a_9bf4b1b54b06["updateHostComponent()"] 17f65ca7_1e68_0419_b46a_9bf4b1b54b06 -->|calls| b22571f1_f869_ca60_b928_0a21847aa17b style b22571f1_f869_ca60_b928_0a21847aa17b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCompleteWork.js lines 216–240
function doesRequireClone(current: null | Fiber, completedWork: Fiber) {
const didBailout = current !== null && current.child === completedWork.child;
if (didBailout) {
return false;
}
if ((completedWork.flags & ChildDeletion) !== NoFlags) {
return true;
}
// TODO: If we move the `doesRequireClone` call after `bubbleProperties`
// then we only have to check the `completedWork.subtreeFlags`.
let child = completedWork.child;
while (child !== null) {
const checkedFlags = Cloned | Visibility | Placement | ChildDeletion;
if (
(child.flags & checkedFlags) !== NoFlags ||
(child.subtreeFlags & checkedFlags) !== NoFlags
) {
return true;
}
child = child.sibling;
}
return false;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does doesRequireClone() do?
doesRequireClone() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCompleteWork.js.
Where is doesRequireClone() defined?
doesRequireClone() is defined in packages/react-reconciler/src/ReactFiberCompleteWork.js at line 216.
What calls doesRequireClone()?
doesRequireClone() is called by 2 function(s): updateHostComponent, updateHostContainer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free