MCPcopy Create free account
hub / github.com/reactjs/react-rails / pushContextProvider

Function pushContextProvider

lib/assets/react-source/development/react.js:14536–14550  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

14534 }
14535
14536 function pushContextProvider(workInProgress) {
14537 {
14538 var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
14539 // If the instance does not exist yet, we will push null at first,
14540 // and replace it on the stack later when invalidating the context.
14541
14542 var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
14543 // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
14544
14545 previousContext = contextStackCursor.current;
14546 push(contextStackCursor, memoizedMergedChildContext, workInProgress);
14547 push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
14548 return true;
14549 }
14550 }
14551
14552 function invalidateContextProvider(workInProgress, type, didChange) {
14553 {

Callers 4

updateClassComponentFunction · 0.85
beginWorkFunction · 0.85

Calls 1

pushFunction · 0.70

Tested by

no test coverage detected