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

Function updatePortal

code/communication/public/app.js:9078–9090  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

9076 }
9077
9078 function updatePortal(returnFiber, current, portal, expirationTime) {
9079 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
9080 // Insert
9081 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
9082 created['return'] = returnFiber;
9083 return created;
9084 } else {
9085 // Update
9086 var existing = useFiber(current, portal.children || [], expirationTime);
9087 existing['return'] = returnFiber;
9088 return existing;
9089 }
9090 }
9091
9092 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
9093 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