MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / getUnmaskedContext

Function getUnmaskedContext

code/new-context-api/public/app.js:11657–11667  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

11655 var previousContext = emptyObject;
11656
11657 function getUnmaskedContext(workInProgress) {
11658 var hasOwnContext = isContextProvider(workInProgress);
11659 if (hasOwnContext) {
11660 // If the fiber is a context provider itself, when we read its context
11661 // we have already pushed its own child context on the stack. A context
11662 // provider should not "see" its own child context. Therefore we read the
11663 // previous (parent) context instead for a context provider.
11664 return previousContext;
11665 }
11666 return contextStackCursor.current;
11667 }
11668
11669 function cacheContext(workInProgress, unmaskedContext, maskedContext) {
11670 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