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

Function updatePortal

code/styling/public/app.js:9043–9055  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

9041 }
9042
9043 function updatePortal(returnFiber, current, portal, expirationTime) {
9044 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
9045 // Insert
9046 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
9047 created['return'] = returnFiber;
9048 return created;
9049 } else {
9050 // Update
9051 var existing = useFiber(current, portal.children || [], expirationTime);
9052 existing['return'] = returnFiber;
9053 return existing;
9054 }
9055 }
9056
9057 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
9058 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