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

Function pushHostContext

code/communication/public/app.js:11968–11982  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11966 }
11967
11968 function pushHostContext(fiber) {
11969 var rootInstance = requiredContext(rootInstanceStackCursor.current);
11970 var context = requiredContext(contextStackCursor.current);
11971 var nextContext = getChildHostContext(context, fiber.type, rootInstance);
11972
11973 // Don't push this Fiber's context unless it's unique.
11974 if (context === nextContext) {
11975 return;
11976 }
11977
11978 // Track the context and the Fiber that provided it.
11979 // This enables us to pop only Fibers that provide unique contexts.
11980 push(contextFiberStackCursor, fiber, fiber);
11981 push(contextStackCursor, nextContext, fiber);
11982 }
11983
11984 function popHostContext(fiber) {
11985 // 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