use-debounce
Advanced tools
Changelog
10.0.4
Changelog
10.0.3
peerDependency
part from package.json
as NPM cannot correctly resolve peerDependency
for beta and rc versions: see https://stackoverflow.com/questions/67934358/npm-including-all-range-of-pre-release-when-defining-peer-dependency for contextChangelog
10.0.2
isPending
does not reset the state if the tracked value hasn't changed.. See https://github.com/xnimorz/use-debounce/issues/178Changelog
10.0.0
index.modern.js
with index.mjs
. Might require a little change in your build pipelinedebounceOnServer
: if you put the option to true, it will run debouncing on server (via setTimeout
). The new option can break your current server behaviour, as v9.x, it runs all the time and might cause unnessesary server CPU utilisation. Now, by default, debounced callbacks do not happen on server.useState
for useDebounce
with useReducer
. It might lead to reduced amount of re-renders, as useState is known to have excess re-renders in some corner: https://stackoverflow.com/questions/57652176/react-hooks-usestate-setvalue-still-rerender-one-more-time-when-value-is-equaluseDebouncedCallback
now updates function to call asap. Meaning, if you re-called the hook and it should trigger immediately, it will trigger the newest function all the time.