Render Step & rAF
After microtasks drain, the browser may paint. requestAnimationFrame callbacks run right before that paint — the right place for visual updates so they land in the next frame.
rAF runs your animation step just before the browser repaints the screen.
Task
task
Microtasks
rAF
Paint
Tap the example to replay it · press and hold to slow it down