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

Function mapRemainingChildren

code/third-party/public/app.js:8183–8198  ·  view source on GitHub ↗
(returnFiber, currentFirstChild)

Source from the content-addressed store, hash-verified

8181 }
8182
8183 function mapRemainingChildren(returnFiber, currentFirstChild) {
8184 // Add the remaining children to a temporary map so that we can find them by
8185 // keys quickly. Implicit (null) keys get added to this set with their index
8186 var existingChildren = new Map();
8187
8188 var existingChild = currentFirstChild;
8189 while (existingChild !== null) {
8190 if (existingChild.key !== null) {
8191 existingChildren.set(existingChild.key, existingChild);
8192 } else {
8193 existingChildren.set(existingChild.index, existingChild);
8194 }
8195 existingChild = existingChild.sibling;
8196 }
8197 return existingChildren;
8198 }
8199
8200 function useFiber(fiber, pendingProps, expirationTime) {
8201 // We currently set sibling to null and index to 0 here because it is easy

Callers 2

reconcileChildrenArrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected