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

Function getUnmaskedContext

code/dependency-injection/public/app.js:12389–12399  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

12387 var previousContext = emptyObject;
12388
12389 function getUnmaskedContext(workInProgress) {
12390 var hasOwnContext = isContextProvider(workInProgress);
12391 if (hasOwnContext) {
12392 // If the fiber is a context provider itself, when we read its context
12393 // we have already pushed its own child context on the stack. A context
12394 // provider should not "see" its own child context. Therefore we read the
12395 // previous (parent) context instead for a context provider.
12396 return previousContext;
12397 }
12398 return contextStackCursor.current;
12399 }
12400
12401 function cacheContext(workInProgress, unmaskedContext, maskedContext) {
12402 var instance = workInProgress.stateNode;

Callers 6

constructClassInstanceFunction · 0.70
mountClassInstanceFunction · 0.70
resumeMountClassInstanceFunction · 0.70
updateClassInstanceFunction · 0.70

Calls 1

isContextProviderFunction · 0.70

Tested by

no test coverage detected