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

Function pushContextProvider

code/redux/public/app.js:12677–12695  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

12675 }
12676
12677 function pushContextProvider(workInProgress) {
12678 if (!isContextProvider(workInProgress)) {
12679 return false;
12680 }
12681
12682 var instance = workInProgress.stateNode;
12683 // We push the context as early as possible to ensure stack integrity.
12684 // If the instance does not exist yet, we will push null at first,
12685 // and replace it on the stack later when invalidating the context.
12686 var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject;
12687
12688 // Remember the parent context so we can merge with it later.
12689 // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
12690 previousContext = contextStackCursor.current;
12691 push(contextStackCursor, memoizedMergedChildContext, workInProgress);
12692 push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
12693
12694 return true;
12695 }
12696
12697 function invalidateContextProvider(workInProgress, didChange) {
12698 var instance = workInProgress.stateNode;

Callers

nothing calls this directly

Calls 2

isContextProviderFunction · 0.70
pushFunction · 0.70

Tested by

no test coverage detected