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

Function workLoop

code/dependency-injection/public/app.js:13344–13356  ·  view source on GitHub ↗
(isAsync)

Source from the content-addressed store, hash-verified

13342 }
13343
13344 function workLoop(isAsync) {
13345 if (!isAsync) {
13346 // Flush all expired work.
13347 while (nextUnitOfWork !== null) {
13348 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13349 }
13350 } else {
13351 // Flush asynchronous work until the deadline runs out of time.
13352 while (nextUnitOfWork !== null && !shouldYield()) {
13353 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13354 }
13355 }
13356 }
13357
13358 function renderRoot(root, expirationTime, isAsync) {
13359 !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;

Callers 1

renderRootFunction · 0.70

Calls 2

performUnitOfWorkFunction · 0.70
shouldYieldFunction · 0.70

Tested by

no test coverage detected