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

Function pushHostContext

docs/external/js/react-dom.development.js:14583–14596  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

14581 }
14582
14583 function pushHostContext(fiber) {
14584 var rootInstance = requiredContext(rootInstanceStackCursor.current);
14585 var context = requiredContext(contextStackCursor$1.current);
14586 var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
14587
14588 if (context === nextContext) {
14589 return;
14590 } // Track the context and the Fiber that provided it.
14591 // This enables us to pop only Fibers that provide unique contexts.
14592
14593
14594 push(contextFiberStackCursor, fiber, fiber);
14595 push(contextStackCursor$1, nextContext, fiber);
14596 }
14597
14598 function popHostContext(fiber) {
14599 // Do not pop unless this Fiber provided the current context.

Callers 2

updateHostComponentFunction · 0.85
beginWorkFunction · 0.85

Calls 3

requiredContextFunction · 0.85
getChildHostContextFunction · 0.85
pushFunction · 0.70

Tested by

no test coverage detected