MCPcopy
hub / github.com/plotly/dash / pushHostContext

Function pushHostContext

dash/deps/react-dom@18.2.0.js:15940–15953  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

15938 }
15939
15940 function pushHostContext(fiber) {
15941 var rootInstance = requiredContext(rootInstanceStackCursor.current);
15942 var context = requiredContext(contextStackCursor$1.current);
15943 var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
15944
15945 if (context === nextContext) {
15946 return;
15947 } // Track the context and the Fiber that provided it.
15948 // This enables us to pop only Fibers that provide unique contexts.
15949
15950
15951 push(contextFiberStackCursor, fiber, fiber);
15952 push(contextStackCursor$1, nextContext, fiber);
15953 }
15954
15955 function popHostContext(fiber) {
15956 // Do not pop unless this Fiber provided the current context.

Callers 2

updateHostComponentFunction · 0.70

Calls 3

requiredContextFunction · 0.70
getChildHostContextFunction · 0.70
pushFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…