# @pruthvi21/use-debounce

> A small simple hook for implementing debounce in react

Latest version **1.0.2** (published 2022-03-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @pruthvi21/use-debounce
pnpm add @pruthvi21/use-debounce
yarn add @pruthvi21/use-debounce
bun add @pruthvi21/use-debounce
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-03-18 |
| First published | 2022-03-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Pruthvi Shetty |
| Maintainers | pruthvi21 |
| Keywords | react, debounce, useDebounce, hooks |

## Links

- npm: https://www.npmjs.com/package/@pruthvi21/use-debounce
- Repository: https://github.com/pruthvi2103/use-debounce
- Homepage: https://github.com/pruthvi2103/use-debounce#readme
- Issues: https://github.com/pruthvi2103/use-debounce/issues
- npm.io page: https://npm.io/package/@pruthvi21/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.0.2 (latest) — 2022-03-18
- 1.0.1 — 2022-03-18
- 0.0.5 — 2022-03-18
- 0.0.4 — 2022-03-18
- 0.0.3 — 2022-03-18
- 0.0.2 — 2022-03-18
- 0.0.1 — 2022-03-18
- 0.0.0 — 2022-03-18

## README

# use-debounce

A Small React hook that implements debouncing in react.

### Install

`npm i @pruthvi21/use-debounce`

or

`yarn add @pruthvi21/use-debounce`

### Usage

```
const someFunction= () => any
const delay = 1000 // delay in ms

const debouncedFunction= useDebounce(delay,someFunction)

debouncedFunction() // Calls it only once after the delay regardless of number of calls
```

### What's Debouncing?

I'd suggest you go through this [blog](https://levelup.gitconnected.com/debounce-in-javascript-improve-your-applications-performance-5b01855e086)

Simpler TL;DR image explaination:

![Image_Explaination](https://miro.medium.com/max/1400/1*-r8hP_iDBPrj-odjIZajzw.gif)

Note Package also published at github's registry

See packages section

`npm install @pruthvi2103/use-debounce`

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