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

Function workLoop

code/higher-order-components/public/app.js:13245–13257  ·  view source on GitHub ↗
(isAsync)

Source from the content-addressed store, hash-verified

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