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

Function getUnmaskedContext

code/third-party/public/app.js:11529–11539  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

11527 var previousContext = emptyObject;
11528
11529 function getUnmaskedContext(workInProgress) {
11530 var hasOwnContext = isContextProvider(workInProgress);
11531 if (hasOwnContext) {
11532 // If the fiber is a context provider itself, when we read its context
11533 // we have already pushed its own child context on the stack. A context
11534 // provider should not "see" its own child context. Therefore we read the
11535 // previous (parent) context instead for a context provider.
11536 return previousContext;
11537 }
11538 return contextStackCursor.current;
11539 }
11540
11541 function cacheContext(workInProgress, unmaskedContext, maskedContext) {
11542 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