reactScrollbar
reactScrollbar copied to clipboard
Debounce and throttle event handlers
This should help improve performance. I don't mind if you accept or not, but I like to use it in my fork.
I need to think about this change because I've never used debounce nor throttle. Is it really improves scrollbar performance?
Well instead of updating the state at every tick it triggers the change event only a defined number of ms, so it could be better performance-wise but could be less fluid I guess, it is worth a test in my opinion.