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

Function pushHostContext

code/styling/public/app.js:11933–11947  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

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