-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: add maxWait
parameter to useDebouncedCallback
hook
#131
Conversation
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 15 32 +17
Lines 111 543 +432
Branches 14 100 +86
==========================================
+ Hits 111 543 +432
Continue to review full report at Codecov.
|
While we are here, should we also implement |
Leading and trailing is only a matter of single implementation for both, throttle and debounce (if you look their throttle - it is only rewrapped debounce). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but see comments above
8207e8a
to
ae8dc44
Compare
# [3.0.0](v2.2.0...v3.0.0) (2021-06-16) ### Bug Fixes * rename useThrottleCallback and useDebounceCallback ([#130](#130)) ([77f66d7](77f66d7)), closes [#129](#129) ### Features * add `maxWait` parameter to `useDebouncedCallback` hook ([#131](#131)) ([600baa8](600baa8)) * change args for `useThrottledCallback` and `useDebouncedCallback` ([#132](#132)) ([131d98e](131d98e)) * new hooks `useDebouncedEffect` and `useDebouncedState` ([#133](#133)) ([1d164ff](1d164ff)) ### BREAKING CHANGES * `delay` and `deps` arguments are swapped position for `useThrottledCallback` and `useDebouncedCallback` hooks to be aligned with `useCallback` signature. * `useDebounceCallback` renamed to `useDebouncedCallback` `useThrottleCallback` renamed to `useThrottledCallback`
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
maxWait
defines maximum amount of milliseconds that function can be delayed before it's force execution. 0 means no max wait (default).should be merged after #130
Checklist