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 read

The 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! ๐Ÿ™