MCPcopy Index your code
hub / github.com/react/react / shouldYieldToHost

Function shouldYieldToHost

packages/scheduler/src/forks/SchedulerMock.js:449–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

447}
448
449function shouldYieldToHost(): boolean {
450 if (
451 (expectedNumberOfYields === 0 && yieldedValues === null) ||
452 (expectedNumberOfYields !== -1 &&
453 yieldedValues !== null &&
454 yieldedValues.length >= expectedNumberOfYields) ||
455 (shouldYieldForPaint && needsPaint)
456 ) {
457 // We yielded at least as many values as expected. Stop flushing.
458 didStop = true;
459 return true;
460 }
461 return false;
462}
463
464function getCurrentTime(): number {
465 return currentMockTime;

Callers 1

workLoopFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected