MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / reconcileSingleTextNode

Function reconcileSingleTextNode

code/communication/public/app.js:9569–9586  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, expirationTime)

Source from the content-addressed store, hash-verified

9567 }
9568
9569 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
9570 // There's no need to check for keys on text nodes since we don't have a
9571 // way to define them.
9572 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
9573 // We already have an existing node so let's just update it and delete
9574 // the rest.
9575 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
9576 var existing = useFiber(currentFirstChild, textContent, expirationTime);
9577 existing['return'] = returnFiber;
9578 return existing;
9579 }
9580 // The existing first child is not a text node so we need to create one
9581 // and delete the existing ones.
9582 deleteRemainingChildren(returnFiber, currentFirstChild);
9583 var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
9584 created['return'] = returnFiber;
9585 return created;
9586 }
9587
9588 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
9589 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