MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / resetExpirationTime

Function resetExpirationTime

code/redux/public/app.js:13298–13319  ·  view source on GitHub ↗
(workInProgress, renderTime)

Source from the content-addressed store, hash-verified

13296 }
13297
13298 function resetExpirationTime(workInProgress, renderTime) {
13299 if (renderTime !== Never && workInProgress.expirationTime === Never) {
13300 // The children of this component are hidden. Don't bubble their
13301 // expiration times.
13302 return;
13303 }
13304
13305 // Check for pending updates.
13306 var newExpirationTime = getUpdateExpirationTime(workInProgress);
13307
13308 // TODO: Calls need to visit stateNode
13309
13310 // Bubble up the earliest expiration time.
13311 var child = workInProgress.child;
13312 while (child !== null) {
13313 if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
13314 newExpirationTime = child.expirationTime;
13315 }
13316 child = child.sibling;
13317 }
13318 workInProgress.expirationTime = newExpirationTime;
13319 }
13320
13321 function completeUnitOfWork(workInProgress) {
13322 // Attempt to complete the current unit of work, then move to the

Callers 1

completeUnitOfWorkFunction · 0.70

Calls 1

getUpdateExpirationTimeFunction · 0.70

Tested by

no test coverage detected