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

Function updatePortal

code/third-party/public/app.js:8276–8288  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

8274 }
8275
8276 function updatePortal(returnFiber, current, portal, expirationTime) {
8277 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
8278 // Insert
8279 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
8280 created['return'] = returnFiber;
8281 return created;
8282 } else {
8283 // Update
8284 var existing = useFiber(current, portal.children || [], expirationTime);
8285 existing['return'] = returnFiber;
8286 return existing;
8287 }
8288 }
8289
8290 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
8291 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