-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throttle rather than debounce? #15
Comments
Hi Daniel, Thanks for the suggestion. Does the
|
That would do it, yeah. Bit of a thing to trip over newcomers, though. Maybe a note in the sample usage section of the readme? |
Hi Daniel, I've updated the documentation to add the maxWait example. It also mentions that lodash debounce is used under the hood and that it can be configured. I hope this addresses the issue you raised? Let me know if I can close this ticket and thanks for use this lib! |
Looking good! |
With debounce, you can get 'starvation' where new events keep arriving, preventing you from ever re-rendering.
lodash.throttle allows one re-render per 'wait' period, which I think would still achieve the performance aims of this library without allowing the UI to get stuck.
The text was updated successfully, but these errors were encountered: