US

Use Debounce

use-debounce

Debounce hook for react

Hooks
debounce
react-hook
react
use-debounce
Hooks
javascript
npm
frontend
open source
ui
Stars
3.4k
Weekly
6.4M
Open issues
16
Bundle
~15 kB

Installation

npm install use-debounce

Code example

import { useDebounce } from "use-debounce";

export function Example() {
  const value = useDebounce();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Nik
  • 6.4M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 16 open issues on GitHub

FAQs

Alternatives & similar libraries