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

Function reconcileSingleTextNode

code/third-party/public/app.js:8767–8784  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, expirationTime)

Source from the content-addressed store, hash-verified

8765 }
8766
8767 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
8768 // There's no need to check for keys on text nodes since we don't have a
8769 // way to define them.
8770 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
8771 // We already have an existing node so let's just update it and delete
8772 // the rest.
8773 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
8774 var existing = useFiber(currentFirstChild, textContent, expirationTime);
8775 existing['return'] = returnFiber;
8776 return existing;
8777 }
8778 // The existing first child is not a text node so we need to create one
8779 // and delete the existing ones.
8780 deleteRemainingChildren(returnFiber, currentFirstChild);
8781 var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
8782 created['return'] = returnFiber;
8783 return created;
8784 }
8785
8786 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
8787 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