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

Function pushHostContext

code/third-party/public/app.js:11166–11180  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11164 }
11165
11166 function pushHostContext(fiber) {
11167 var rootInstance = requiredContext(rootInstanceStackCursor.current);
11168 var context = requiredContext(contextStackCursor.current);
11169 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
11170
11171 // Don't push this Fiber's context unless it's unique.
11172 if (context === nextContext) {
11173 return;
11174 }
11175
11176 // Track the context and the Fiber that provided it.
11177 // This enables us to pop only Fibers that provide unique contexts.
11178 push(contextFiberStackCursor, fiber, fiber);
11179 push(contextStackCursor, nextContext, fiber);
11180 }
11181
11182 function popHostContext(fiber) {
11183 // 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