site
site copied to clipboard
[skip netlify]: Bump use-debounce from 3.4.3 to 7.0.0
Bumps use-debounce from 3.4.3 to 7.0.0.
Release notes
Sourced from use-debounce's releases.
7.0.0 isPending is sync
breakng change
useDebounce
hook changedisPending
behavior fromasync
reacting to the sync. NowisPending
returnsTrue
as soon as the new value is sent to the hook: Example is here: https://github.com/xnimorz/use-debounce/blob/master/test/useDebounce.test.tsx#L303-L329Dev dependencies updated
6.0.1
- Fixed
useDebouncedCallback
return type. Closed xnimorz/use-debounce#103 thanks to@VanTanev
Clarifying API and major under hood improvements
breakind change: removed
callback
field, instead of thisuseDebouncedCallback
anduseThrottledCallback
returns a callable function: Old:const { callback, pending } = useDebouncedCallback(/*...*/); // ... debounced.callback();
New:
const debounced = useDebouncedCallback(/*...*/); // ... debounced(); /** * Also debounced has fields: * { * cancel: () => void * flush: () => void * isPending: () => boolean * } * So you can call debounced.cancel(), debounced.flush(), debounced.isPending() */
It makes easier to understand which cancel \ flush or isPending is called in case you have several debounced functions in your component
breaking change: Now
useDebounce
,useDebouncedCallback
anduseThrottledCallback
hasisPending
method instead ofpending
Old:
const { callback, pending } = useDebouncedCallback(/*...*/);
New:
... (truncated)
Changelog
Sourced from use-debounce's changelog.
7.0.0
- breaking change
useDebounce
hook changedisPending
behavior fromasync
reacting to the sync. NowisPending
returnsTrue
as soon as the new value is sent to the hook.- Dev dependencies updated
6.0.1
- Fixed
useDebouncedCallback
return type. Closed xnimorz/use-debounce#103 thanks to@VanTanev
6.0.0
breakind change: removed
callback
field, instead of thisuseDebouncedCallback
anduseThrottledCallback
returns a callable function: Old:const { callback, pending } = useDebouncedCallback(/*...*/); // ... debounced.callback();
New:
const debounced = useDebouncedCallback(/*...*/); // ... debounced(); /** * Also debounced has fields: * { * cancel: () => void * flush: () => void * isPending: () => boolean * } * So you can call debounced.cancel(), debounced.flush(), debounced.isPending() */
It makes easier to understand which cancel \ flush or isPending is called in case you have several debounced functions in your component
breaking change: Now
useDebounce
,useDebouncedCallback
anduseThrottledCallback
hasisPending
method instead ofpending
Old:
const { callback, pending } = useDebouncedCallback(/*...*/);
New:
const { isPending } = useDebouncedCallback(/*...*/);
... (truncated)
Commits
- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot will not automatically merge this PR because it includes an out-of-range update to a production dependency.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot badge me
will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in the .dependabot/config.yml
file in this repo:
- Update frequency
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)