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

Function updatePortal

code/controlled-uncontrolled/public/app.js:8367–8379  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

8365 }
8366
8367 function updatePortal(returnFiber, current, portal, expirationTime) {
8368 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
8369 // Insert
8370 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
8371 created['return'] = returnFiber;
8372 return created;
8373 } else {
8374 // Update
8375 var existing = useFiber(current, portal.children || [], expirationTime);
8376 existing['return'] = returnFiber;
8377 return existing;
8378 }
8379 }
8380
8381 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
8382 if (current === null || current.tag !== Fragment) {

Callers 2

updateSlotFunction · 0.70
updateFromMapFunction · 0.70

Calls 2

createFiberFromPortalFunction · 0.70
useFiberFunction · 0.70

Tested by

no test coverage detected