MCPcopy Create free account
hub / github.com/plotly/dash / reconcileSingleTextNode

Function reconcileSingleTextNode

dash/deps/react-dom@18.3.1.js:13915–13933  ·  view source on GitHub ↗
(returnFiber, currentFirstChild, textContent, lanes)

Source from the content-addressed store, hash-verified

13913 }
13914
13915 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
13916 // There's no need to check for keys on text nodes since we don't have a
13917 // way to define them.
13918 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
13919 // We already have an existing node so let's just update it and delete
13920 // the rest.
13921 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
13922 var existing = useFiber(currentFirstChild, textContent);
13923 existing.return = returnFiber;
13924 return existing;
13925 } // The existing first child is not a text node so we need to create one
13926 // and delete the existing ones.
13927
13928
13929 deleteRemainingChildren(returnFiber, currentFirstChild);
13930 var created = createFiberFromText(textContent, returnFiber.mode, lanes);
13931 created.return = returnFiber;
13932 return created;
13933 }
13934
13935 function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
13936 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…