dillon1000/react
Commit
Browse files [scheduler] Eagerly schedule rAF at beginning of frame (#13785)
* [scheduler] Eagerly schedule rAF at beginning of frame Eagerly schedule the next animation callback at the beginning of the frame. If the scheduler queue is not empty at the end of the frame, it will continue flushing inside that callback. If the queue *is* empty, then it will exit immediately. Posting the callback at the start of the frame ensures it's fired within the earliest possible frame. If we waited until the end of the frame to post the callback, we risk the browser skipping a frame and not firing the callback until the frame after that. * Re-name scheduledCallback -> scheduledHostCallback
Changed paths2 files
First-parent comparisonpackages/scheduler/src/Scheduler.js ModifiedM packages/scheduler/src/__tests__/SchedulerDOM-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…