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

Function pushHostContext

code/composition/public/app.js:12071–12085  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

12069 }
12070
12071 function pushHostContext(fiber) {
12072 var rootInstance = requiredContext(rootInstanceStackCursor.current);
12073 var context = requiredContext(contextStackCursor.current);
12074 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
12075
12076 // Don't push this Fiber's context unless it's unique.
12077 if (context === nextContext) {
12078 return;
12079 }
12080
12081 // Track the context and the Fiber that provided it.
12082 // This enables us to pop only Fibers that provide unique contexts.
12083 push(contextFiberStackCursor, fiber, fiber);
12084 push(contextStackCursor, nextContext, fiber);
12085 }
12086
12087 function popHostContext(fiber) {
12088 // Do not pop unless this Fiber provided the current context.

Callers 1

updateHostComponentFunction · 0.70

Calls 2

requiredContextFunction · 0.70
pushFunction · 0.70

Tested by

no test coverage detected