Socket
Socket
Sign inDemoInstall

use-debounce

Package Overview
Dependencies
3
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2345
8Next

10.0.0

Diff

Changelog

Source

10.0.0

  • Major breaking change: replaced index.modern.js with index.mjs. Might require a little change in your build pipeline
  • Major breaking change: New option debounceOnServer: 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.
  • Minor breaking change: Replaced 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-equal
  • Minor breaking change: useDebouncedCallback 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.
  • Lib size: 914 B: index.js.gz 851 B: index.js.br 883 B: index.mjs.gz 826 B: index.mjs.br 938 B: index.module.js.gz 873 B: index.module.js.br 989 B: index.umd.js.gz 919 B: index.umd.js.br
  • [Internal] Replaced Enzyme with @testing-library
  • [Internal] yarn classic => npm
  • [Internal] Updated devDependencies
xnimorz
published 10.0.0-alpha •

xnimorz
published 9.0.4 •

Changelog

Source

9.0.4

  • Tweak exports, see PR, thanks to @Andarist
  • Changed types, see PR, thanks to @wangcch
xnimorz
published 9.0.3 •

Changelog

Source

9.0.3

  • Represent correct return type from useDebounce(), see issue, thanks to @appden
xnimorz
published 9.0.2 •

Changelog

Source

9.0.2

  • Reverted 9.0.0. We will revisit these changes later
xnimorz
published 9.0.1 •

xnimorz
published 9.0.0 •

Changelog

Source

9.0.0

  • Moved use-debounce to support modules see issue Thanks to @matewilk
  • breaking change The path to dist/index.js is changed. Now it's dist/index.cjs.
xnimorz
published 8.0.4 •

Changelog

Source

8.0.4

  • Changes types for useDebouncedCallback args: https://github.com/xnimorz/use-debounce/pull/140 Thanks to @sarunast
xnimorz
published 8.0.3 •

Changelog

Source

8.0.3

  • Added types to package json to mitigate https://github.com/microsoft/TypeScript/issues/49160. https://github.com/xnimorz/use-debounce/pull/138 Thanks to @wuzzeb
xnimorz
published 8.0.2 •

Changelog

Source

8.0.2

  • Added type exports. https://github.com/xnimorz/use-debounce/pull/136 Thanks to @tryggvigy
  • Improved code comments. https://github.com/xnimorz/use-debounce/pull/135 Thanks to @tryggvigy
2345
8Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc