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

Function mapRemainingChildren

code/styling/public/app.js:8950–8965  ·  view source on GitHub ↗
(returnFiber, currentFirstChild)

Source from the content-addressed store, hash-verified

8948 }
8949
8950 function mapRemainingChildren(returnFiber, currentFirstChild) {
8951 // Add the remaining children to a temporary map so that we can find them by
8952 // keys quickly. Implicit (null) keys get added to this set with their index
8953 var existingChildren = new Map();
8954
8955 var existingChild = currentFirstChild;
8956 while (existingChild !== null) {
8957 if (existingChild.key !== null) {
8958 existingChildren.set(existingChild.key, existingChild);
8959 } else {
8960 existingChildren.set(existingChild.index, existingChild);
8961 }
8962 existingChild = existingChild.sibling;
8963 }
8964 return existingChildren;
8965 }
8966
8967 function useFiber(fiber, pendingProps, expirationTime) {
8968 // 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