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

Function pushHostContext

code/one-direction-data-flow/public/app.js:11806–11820  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11804 }
11805
11806 function pushHostContext(fiber) {
11807 var rootInstance = requiredContext(rootInstanceStackCursor.current);
11808 var context = requiredContext(contextStackCursor.current);
11809 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
11810
11811 // Don't push this Fiber's context unless it's unique.
11812 if (context === nextContext) {
11813 return;
11814 }
11815
11816 // Track the context and the Fiber that provided it.
11817 // This enables us to pop only Fibers that provide unique contexts.
11818 push(contextFiberStackCursor, fiber, fiber);
11819 push(contextStackCursor, nextContext, fiber);
11820 }
11821
11822 function popHostContext(fiber) {
11823 // 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