MCPcopy Create free account
hub / github.com/plotly/dash / prepareToReadContext

Function prepareToReadContext

dash/deps/react-dom@18.3.1.js:14350–14371  ·  view source on GitHub ↗
(workInProgress, renderLanes)

Source from the content-addressed store, hash-verified

14348 }
14349 }
14350 function prepareToReadContext(workInProgress, renderLanes) {
14351 currentlyRenderingFiber = workInProgress;
14352 lastContextDependency = null;
14353 lastFullyObservedContext = null;
14354 var dependencies = workInProgress.dependencies;
14355
14356 if (dependencies !== null) {
14357 {
14358 var firstContext = dependencies.firstContext;
14359
14360 if (firstContext !== null) {
14361 if (includesSomeLane(dependencies.lanes, renderLanes)) {
14362 // Context list has a pending update. Mark that this fiber performed work.
14363 markWorkInProgressReceivedUpdate();
14364 } // Reset the work-in-progress list
14365
14366
14367 dependencies.firstContext = null;
14368 }
14369 }
14370 }
14371 }
14372 function readContext(context) {
14373 {
14374 // This warning would fire if you read context inside a Hook like useMemo.

Callers 6

updateForwardRefFunction · 0.70
updateFunctionComponentFunction · 0.70
updateClassComponentFunction · 0.70
updateContextConsumerFunction · 0.70

Calls 2

includesSomeLaneFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…