MCPcopy Create free account
hub / github.com/caseywebdev/react-list / commitPlacement

Function commitPlacement

docs/index.js:29915–29958  ·  view source on GitHub ↗
(finishedWork)

Source from the content-addressed store, hash-verified

29913 (node = node.sibling);
29914 }
29915 function commitPlacement(finishedWork) {
29916 if (27 !== finishedWork.tag) {
29917 a: {
29918 for (var parent = finishedWork.return; null !== parent; ) {
29919 if (isHostParent(parent)) {
29920 var parentFiber = parent;
29921 break a;
29922 }
29923 parent = parent.return;
29924 }
29925 throw Error(
29926 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
29927 );
29928 }
29929 switch (parentFiber.tag) {
29930 case 27:
29931 parent = parentFiber.stateNode;
29932 parentFiber = getHostSibling(finishedWork);
29933 insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
29934 break;
29935 case 5:
29936 parent = parentFiber.stateNode;
29937 parentFiber.flags & 32 &&
29938 (resetTextContent(parent), (parentFiber.flags &= -33));
29939 parentFiber = getHostSibling(finishedWork);
29940 insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
29941 break;
29942 case 3:
29943 case 4:
29944 parent = parentFiber.stateNode.containerInfo;
29945 parentFiber = getHostSibling(finishedWork);
29946 insertOrAppendPlacementNodeIntoContainer(
29947 finishedWork,
29948 parentFiber,
29949 parent
29950 );
29951 break;
29952 default:
29953 throw Error(
29954 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
29955 );
29956 }
29957 }
29958 }
29959 function commitBeforeMutationEffects(root, firstChild) {
29960 root = root.containerInfo;
29961 eventsEnabled = _enabled;

Callers

nothing calls this directly

Calls 5

isHostParentFunction · 0.85
getHostSiblingFunction · 0.85
resetTextContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…