MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / reconcileSingleTextNode

Function reconcileSingleTextNode

code/composition/public/app.js:9672–9689  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, expirationTime)

Source from the content-addressed store, hash-verified

9670 }
9671
9672 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
9673 // There's no need to check for keys on text nodes since we don't have a
9674 // way to define them.
9675 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
9676 // We already have an existing node so let's just update it and delete
9677 // the rest.
9678 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
9679 var existing = useFiber(currentFirstChild, textContent, expirationTime);
9680 existing['return'] = returnFiber;
9681 return existing;
9682 }
9683 // The existing first child is not a text node so we need to create one
9684 // and delete the existing ones.
9685 deleteRemainingChildren(returnFiber, currentFirstChild);
9686 var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
9687 created['return'] = returnFiber;
9688 return created;
9689 }
9690
9691 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
9692 var key = element.key;

Callers 1

reconcileChildFibersFunction · 0.70

Calls 3

deleteRemainingChildrenFunction · 0.70
useFiberFunction · 0.70
createFiberFromTextFunction · 0.70

Tested by

no test coverage detected