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

Function updatePortal

code/one-direction-data-flow/public/app.js:8916–8928  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

8914 }
8915
8916 function updatePortal(returnFiber, current, portal, expirationTime) {
8917 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
8918 // Insert
8919 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
8920 created['return'] = returnFiber;
8921 return created;
8922 } else {
8923 // Update
8924 var existing = useFiber(current, portal.children || [], expirationTime);
8925 existing['return'] = returnFiber;
8926 return existing;
8927 }
8928 }
8929
8930 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
8931 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