MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / pushHostContext

Function pushHostContext

code/new-context-api/public/app.js:11294–11308  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11292 }
11293
11294 function pushHostContext(fiber) {
11295 var rootInstance = requiredContext(rootInstanceStackCursor.current);
11296 var context = requiredContext(contextStackCursor.current);
11297 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
11298
11299 // Don't push this Fiber's context unless it's unique.
11300 if (context === nextContext) {
11301 return;
11302 }
11303
11304 // Track the context and the Fiber that provided it.
11305 // This enables us to pop only Fibers that provide unique contexts.
11306 push(contextFiberStackCursor, fiber, fiber);
11307 push(contextStackCursor, nextContext, fiber);
11308 }
11309
11310 function popHostContext(fiber) {
11311 // 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