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

Function updatePortal

code/dependency-injection/public/app.js:9136–9148  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

9134 }
9135
9136 function updatePortal(returnFiber, current, portal, expirationTime) {
9137 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
9138 // Insert
9139 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
9140 created['return'] = returnFiber;
9141 return created;
9142 } else {
9143 // Update
9144 var existing = useFiber(current, portal.children || [], expirationTime);
9145 existing['return'] = returnFiber;
9146 return existing;
9147 }
9148 }
9149
9150 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
9151 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