MCPcopy Create free account
hub / github.com/BetaSu/big-react / commitPlacement

Function commitPlacement

packages/react-reconciler/src/commitWork.ts:430–444  ·  view source on GitHub ↗
(finishedWork: FiberNode)

Source from the content-addressed store, hash-verified

428}
429
430const commitPlacement = (finishedWork: FiberNode) => {
431 if (__DEV__) {
432 console.warn('执行Placement操作', finishedWork);
433 }
434 // parent DOM
435 const hostParent = getHostParent(finishedWork);
436
437 // host sibling
438 const sibling = getHostSibling(finishedWork);
439
440 // finishedWork ~~ DOM append parent DOM
441 if (hostParent !== null) {
442 insertOrAppendPlacementNodeIntoContainer(finishedWork, hostParent, sibling);
443 }
444};
445
446function getHostSibling(fiber: FiberNode) {
447 let node: FiberNode = fiber;

Callers 1

Calls 3

getHostParentFunction · 0.85
getHostSiblingFunction · 0.85

Tested by

no test coverage detected