MCPcopy Create free account
hub / github.com/plotly/dash / pushHostContext

Function pushHostContext

dash/deps/react-dom@18.3.1.js:15121–15134  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

15119 }
15120
15121 function pushHostContext(fiber) {
15122 var rootInstance = requiredContext(rootInstanceStackCursor.current);
15123 var context = requiredContext(contextStackCursor$1.current);
15124 var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
15125
15126 if (context === nextContext) {
15127 return;
15128 } // Track the context and the Fiber that provided it.
15129 // This enables us to pop only Fibers that provide unique contexts.
15130
15131
15132 push(contextFiberStackCursor, fiber, fiber);
15133 push(contextStackCursor$1, nextContext, fiber);
15134 }
15135
15136 function popHostContext(fiber) {
15137 // 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…