Throttling & debouncing
Mouse moves, scrolls and window resizes fire dozens of times per second. Reacting to every one of them is a fast way to make a chart feel sluggish.
Throttling and debouncing let you handle these events at a sane rate instead. Two small helpers that go a long way.
Members only
4 minutes readThe previous lesson cached expensive computations. This one caches something else: the firing of events.
Reach for this whenever a handler runs on mousemove, scroll, or resize.
Oh no! ๐ฑ
This lesson isnโt available just yet.
Take a look at the status badges next to each lesson in the sidebar to see when itโs coming out.
Thanks for your patience! ๐