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

Function mapRemainingChildren

code/communication/public/app.js:8985–9000  ·  view source on GitHub ↗
(returnFiber, currentFirstChild)

Source from the content-addressed store, hash-verified

8983 }
8984
8985 function mapRemainingChildren(returnFiber, currentFirstChild) {
8986 // Add the remaining children to a temporary map so that we can find them by
8987 // keys quickly. Implicit (null) keys get added to this set with their index
8988 var existingChildren = new Map();
8989
8990 var existingChild = currentFirstChild;
8991 while (existingChild !== null) {
8992 if (existingChild.key !== null) {
8993 existingChildren.set(existingChild.key, existingChild);
8994 } else {
8995 existingChildren.set(existingChild.index, existingChild);
8996 }
8997 existingChild = existingChild.sibling;
8998 }
8999 return existingChildren;
9000 }
9001
9002 function useFiber(fiber, pendingProps, expirationTime) {
9003 // 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