cloneChildFibers() — react Function Reference
Architecture documentation for the cloneChildFibers() function in ReactChildFiber.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 67acc598_7202_395c_2c4c_b3d6de49d490["cloneChildFibers()"] 8a694f3e_c887_fb18_4515_e3e4488bb43e["ReactChildFiber.js"] 67acc598_7202_395c_2c4c_b3d6de49d490 -->|defined in| 8a694f3e_c887_fb18_4515_e3e4488bb43e 6cb202e6_76dc_0479_ff31_d0ef23610882["bailoutOnAlreadyFinishedWork()"] 6cb202e6_76dc_0479_ff31_d0ef23610882 -->|calls| 67acc598_7202_395c_2c4c_b3d6de49d490 style 67acc598_7202_395c_2c4c_b3d6de49d490 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactChildFiber.js lines 2114–2140
export function cloneChildFibers(
current: Fiber | null,
workInProgress: Fiber,
): void {
if (current !== null && workInProgress.child !== current.child) {
throw new Error('Resuming work not yet implemented.');
}
if (workInProgress.child === null) {
return;
}
let currentChild = workInProgress.child;
let newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
workInProgress.child = newChild;
newChild.return = workInProgress;
while (currentChild.sibling !== null) {
currentChild = currentChild.sibling;
newChild = newChild.sibling = createWorkInProgress(
currentChild,
currentChild.pendingProps,
);
newChild.return = workInProgress;
}
newChild.sibling = null;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does cloneChildFibers() do?
cloneChildFibers() is a function in the react codebase, defined in packages/react-reconciler/src/ReactChildFiber.js.
Where is cloneChildFibers() defined?
cloneChildFibers() is defined in packages/react-reconciler/src/ReactChildFiber.js at line 2114.
What calls cloneChildFibers()?
cloneChildFibers() is called by 1 function(s): bailoutOnAlreadyFinishedWork.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free