MCPcopy Create free account
hub / github.com/reactjs/react-rails / pushHostContext

Function pushHostContext

lib/assets/react-source/development/react.js:18143–18156  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

18141 }
18142
18143 function pushHostContext(fiber) {
18144 var rootInstance = requiredContext(rootInstanceStackCursor.current);
18145 var context = requiredContext(contextStackCursor$1.current);
18146 var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
18147
18148 if (context === nextContext) {
18149 return;
18150 } // Track the context and the Fiber that provided it.
18151 // This enables us to pop only Fibers that provide unique contexts.
18152
18153
18154 push(contextFiberStackCursor, fiber, fiber);
18155 push(contextStackCursor$1, nextContext, fiber);
18156 }
18157
18158 function popHostContext(fiber) {
18159 // Do not pop unless this Fiber provided the current context.

Callers 2

updateHostComponentFunction · 0.85
beginWorkFunction · 0.85

Calls 3

requiredContextFunction · 0.85
getChildHostContextFunction · 0.85
pushFunction · 0.70

Tested by

no test coverage detected