MCPcopy Create free account
hub / github.com/microsoft/SandDance / updatePortal

Function updatePortal

docs/external/js/react-dom.development.js:13721–13733  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

13719 }
13720
13721 function updatePortal(returnFiber, current, portal, expirationTime) {
13722 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
13723 // Insert
13724 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
13725 created.return = returnFiber;
13726 return created;
13727 } else {
13728 // Update
13729 var existing = useFiber(current, portal.children || []);
13730 existing.return = returnFiber;
13731 return existing;
13732 }
13733 }
13734
13735 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
13736 if (current === null || current.tag !== Fragment) {

Callers 2

updateSlotFunction · 0.85
updateFromMapFunction · 0.85

Calls 2

createFiberFromPortalFunction · 0.85
useFiberFunction · 0.85

Tested by

no test coverage detected