MCPcopy Create free account
hub / github.com/reactjs/react-rails / updatePortal

Function updatePortal

lib/assets/react-source/development/react.js:17281–17293  ·  view source on GitHub ↗
(returnFiber, current, portal, expirationTime)

Source from the content-addressed store, hash-verified

17279 }
17280
17281 function updatePortal(returnFiber, current, portal, expirationTime) {
17282 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
17283 // Insert
17284 var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
17285 created.return = returnFiber;
17286 return created;
17287 } else {
17288 // Update
17289 var existing = useFiber(current, portal.children || []);
17290 existing.return = returnFiber;
17291 return existing;
17292 }
17293 }
17294
17295 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
17296 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