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

Function reconcileSingleTextNode

code/redux/public/app.js:9785–9802  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, expirationTime)

Source from the content-addressed store, hash-verified

9783 }
9784
9785 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
9786 // There's no need to check for keys on text nodes since we don't have a
9787 // way to define them.
9788 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
9789 // We already have an existing node so let's just update it and delete
9790 // the rest.
9791 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
9792 var existing = useFiber(currentFirstChild, textContent, expirationTime);
9793 existing['return'] = returnFiber;
9794 return existing;
9795 }
9796 // The existing first child is not a text node so we need to create one
9797 // and delete the existing ones.
9798 deleteRemainingChildren(returnFiber, currentFirstChild);
9799 var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
9800 created['return'] = returnFiber;
9801 return created;
9802 }
9803
9804 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
9805 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