3 ms·
Request animation frame exists specifically to avoid ‘traditional’ polling. You’re thinking more of setInterval() which is the old way of doing it. The requestA
by have_faith 5y ago
Request animation frame exists specifically to avoid ‘traditional’ polling. You’re thinking more of setInterval() which is the old way of doing it. The requestAnimationFrame docs are a good read, there are lots of performance benefits.