MCPcopy Index your code
hub / github.com/react/react / cacheContext

Function cacheContext

packages/react-reconciler/src/ReactFiberLegacyContext.js:59–71  ·  view source on GitHub ↗
(
  workInProgress: Fiber,
  unmaskedContext: Object,
  maskedContext: Object,
)

Source from the content-addressed store, hash-verified

57}
58
59function cacheContext(
60 workInProgress: Fiber,
61 unmaskedContext: Object,
62 maskedContext: Object,
63): void {
64 if (disableLegacyContext) {
65 return;
66 } else {
67 const instance = workInProgress.stateNode;
68 instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
69 instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
70 }
71}
72
73function getMaskedContext(
74 workInProgress: Fiber,

Callers 2

constructClassInstanceFunction · 0.90
getMaskedContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected