Raoul - Web Application Developer
  • home
  • github
  • npmjs
  • Imprint / Privacy
Subscribe
Tagged

cancelAnimationFrame

A collection of 1 post

javascript - choosing the right timeout is easy
plain js

javascript - choosing the right timeout is easy

Every once in awhile I see code that debounces expensive events like resize or scroll: someTimeout = window.setTimeout(debounceScroll, 10); and I wonder about the magic numbers, developers choose. magic numbers In the example the dev thinks 10 milliseconds is a good time to debounce this event. The whole code

  • Raoul
Raoul Oct 4, 2017 • 2 min read
Raoul - Web Application Developer © 2023
Powered by Ghost