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

Function mapRemainingChildren

code/composition/public/app.js:9088–9103  ·  view source on GitHub ↗
(returnFiber, currentFirstChild)

Source from the content-addressed store, hash-verified

9086 }
9087
9088 function mapRemainingChildren(returnFiber, currentFirstChild) {
9089 // Add the remaining children to a temporary map so that we can find them by
9090 // keys quickly. Implicit (null) keys get added to this set with their index
9091 var existingChildren = new Map();
9092
9093 var existingChild = currentFirstChild;
9094 while (existingChild !== null) {
9095 if (existingChild.key !== null) {
9096 existingChildren.set(existingChild.key, existingChild);
9097 } else {
9098 existingChildren.set(existingChild.index, existingChild);
9099 }
9100 existingChild = existingChild.sibling;
9101 }
9102 return existingChildren;
9103 }
9104
9105 function useFiber(fiber, pendingProps, expirationTime) {
9106 // 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