# @react-hooks-hub/use-debounce

> This react hook provide a way to delay execution of functions, enhancing user experience and performance.

Latest version **1.1.9** (published 2025-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-hooks-hub/use-debounce
pnpm add @react-hooks-hub/use-debounce
yarn add @react-hooks-hub/use-debounce
bun add @react-hooks-hub/use-debounce
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2025-09-16 |
| First published | 2023-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Keized |
| Maintainers | keized |
| Keywords | react, react-hook, react hook, hook, react debounce, debounce hook, debounce |

## Links

- npm: https://www.npmjs.com/package/@react-hooks-hub/use-debounce
- Repository: https://github.com/Keized/react-hooks-hub
- Homepage: https://github.com/Keized/react-hooks-hub/blob/main/packages/use-debounce/README.md
- Issues: https://github.com/Keized/react-hooks-hub/issues
- npm.io page: https://npm.io/package/@react-hooks-hub/use-debounce

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.9 (latest) — 2025-09-16
- 1.1.8 — 2024-06-20
- 1.1.7 — 2024-03-04
- 1.1.6 — 2023-12-19
- 1.1.5 — 2023-10-26
- 1.1.4 — 2023-09-29
- 1.1.3 — 2023-09-10
- 1.1.2 — 2023-09-01
- 1.1.1 — 2023-08-29
- 1.1.0 — 2023-08-28
- 1.0.0 — 2023-08-28

## README

<h1 align="center">Use Debounce</h1>

<p align="center">
  `@react-hooks-hub/use-debounce` hook allows you to manage delayed execution of functions, making it particularly useful for scenarios where you need to control the rate of certain actions based on user input.
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@react-hooks-hub/use-debounce" title="use-debounce on NPM">
  <img src="https://img.shields.io/npm/v/@react-hooks-hub/use-debounce.svg?style=for-the-badge" alt="NPM version" />
  </a>
  <img src="https://img.shields.io/github/actions/workflow/status/Keized/react-hooks-hub/use-debounce.yml?style=for-the-badge" alt="CI status" />
  &nbsp;
  <img src="https://img.shields.io/codecov/c/github/keized/react-hooks-hub?flag=use-debounce&style=for-the-badge" alt="Coverage" />
  &nbsp;
  <img src="https://img.shields.io/bundlephobia/minzip/@react-hooks-hub/use-debounce?style=for-the-badge" alt="Bundlephobia" />
  &nbsp;
</p>



# @react-hooks-hub/use-debounce


## Installation

Use your preferred package manager to install `@react-hooks-hub/use-debounce`:

```bash
npm install @react-hooks-hub/use-debounce
# or
yarn add @react-hooks-hub/use-debounce
```

## Usage

Import and use the useDebounce hook in your component:

```JSX
import React from 'react';
import { useDebounce } from '@react-hooks-hub/use-debounce';

const MyComponent = () => {
  // Create a debounced version of the handleSearch function using the useDebounce hook
  // The debounced function will trigger after a 300ms delay after the last change
  const debouncedSearch = useDebounce(handleSearch, 300);

  // Define the handleSearch function, which represents the action to be debounced
  // This function takes a 'query' parameter representing the search query
  // In this example, the function logs the query to the console
  const handleSearch = (query: string) => {
    console.log(query);
  };

  return (
    <input
      type="text"
      onChange={(e) => debouncedSearch(e.target.value)}
      placeholder="Search..."
    />
  );
};

export default MyComponent;
```

---
_Source: https://npm.io/package/@react-hooks-hub/use-debounce · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
