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

Function updatePortal

code/new-context-api/public/app.js:8404–8416  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

8402 }
8403
8404 function updatePortal(returnFiber, current, portal, expirationTime) {
8405 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
8406 // Insert
8407 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
8408 created['return'] = returnFiber;
8409 return created;
8410 } else {
8411 // Update
8412 var existing = useFiber(current, portal.children || [], expirationTime);
8413 existing['return'] = returnFiber;
8414 return existing;
8415 }
8416 }
8417
8418 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
8419 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