xnimorz/use-debounce

A debounce hook for react

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 50 minutes ago
Added to GitGenius on September 20th, 2026
Created on November 9th, 2018
Open Issues & Pull Requests: 16 (+0)
GitHub issues: Enabled
Number of forks: 120
Total Stargazers: 3,385 (+0)
Total Subscribers: 8 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 611 days
Stale 30+ days: 4
Stale 90+ days: 4

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (4)
  • enhancement (1)
  • question (1)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

use-debounce is a React hook library for debouncing values and callbacks.

The library solves the problem of managing delayed execution in React components without adding significant bundle size. It provides three main hooks: useDebounce for debouncing values, useDebouncedCallback for debouncing function calls, and useThrottledCallback for throttling. The approach follows patterns familiar from underscore and lodash, making it easy for developers already comfortable with those libraries to adopt it in React. The implementation is server-rendering friendly and tree-shakeable.

Developers should choose this tool when building React applications that need debouncing—such as search inputs, scroll handlers, or API request throttling—and want to avoid large utility library dependencies. The library is particularly suited for projects where bundle size matters. It handles both simple value debouncing with shallow equality comparison and more complex callback debouncing scenarios. The tool supports advanced features including maxWait to enforce maximum delay times, cancel methods to stop pending debounced operations, and memoization to prevent unnecessary re-renders.

The project maintains active development with regular updates documented in its changelog. The maintainers provide extensive examples through CodeSandbox demonstrations covering common use cases from simple value debouncing to HTTP request handling with leading parameter support. The codebase is written in TypeScript with types included in the package, and the project includes comprehensive documentation of edge cases such as how shallow equality affects object comparisons in value debouncing.