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

Function pushHostContext

code/higher-order-components/public/app.js:11927–11941  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11925 }
11926
11927 function pushHostContext(fiber) {
11928 var rootInstance = requiredContext(rootInstanceStackCursor.current);
11929 var context = requiredContext(contextStackCursor.current);
11930 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
11931
11932 // Don't push this Fiber's context unless it's unique.
11933 if (context === nextContext) {
11934 return;
11935 }
11936
11937 // Track the context and the Fiber that provided it.
11938 // This enables us to pop only Fibers that provide unique contexts.
11939 push(contextFiberStackCursor, fiber, fiber);
11940 push(contextStackCursor, nextContext, fiber);
11941 }
11942
11943 function popHostContext(fiber) {
11944 // 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