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

Function reconcileSingleTextNode

code/event-handlers/public/app.js:8864–8881  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, expirationTime)

Source from the content-addressed store, hash-verified

8862 }
8863
8864 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
8865 // There's no need to check for keys on text nodes since we don't have a
8866 // way to define them.
8867 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
8868 // We already have an existing node so let's just update it and delete
8869 // the rest.
8870 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
8871 var existing = useFiber(currentFirstChild, textContent, expirationTime);
8872 existing['return'] = returnFiber;
8873 return existing;
8874 }
8875 // The existing first child is not a text node so we need to create one
8876 // and delete the existing ones.
8877 deleteRemainingChildren(returnFiber, currentFirstChild);
8878 var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
8879 created['return'] = returnFiber;
8880 return created;
8881 }
8882
8883 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
8884 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