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

Function workLoop

code/styling/public/app.js:13251–13263  ·  view source on GitHub ↗
(isAsync)

Source from the content-addressed store, hash-verified

13249 }
13250
13251 function workLoop(isAsync) {
13252 if (!isAsync) {
13253 // Flush all expired work.
13254 while (nextUnitOfWork !== null) {
13255 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13256 }
13257 } else {
13258 // Flush asynchronous work until the deadline runs out of time.
13259 while (nextUnitOfWork !== null && !shouldYield()) {
13260 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13261 }
13262 }
13263 }
13264
13265 function renderRoot(root, expirationTime, isAsync) {
13266 !!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