Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-debounce-func

dev-shajid10ISC1.0.1

this is a debounce-function

debounce, react-debounce, debounce-hook, debounce-function

readme

react-debounce-func

It's a debounce react hook, which takes two parameter

  • Function to be debounced
  • Duration time

  1. First Install the package

       npm install react-debounce-func
  2. Import and call

       import {useDebounce} from 'react-debounce-func'
    
       export default function App(){
         const handleEvent=(...)=>{
           // ....
         }
         const debouncedHandleEvent = useDebounce(handleEvent, 1000)
    
         // Call the debouncedHandleEvent function (with parameter if handleEvent have) in any where you want
         return (
           <>
    
           </>
         )
       }

❤️ Support

If you liked the project, I will appreciate if you leave a star. 🌟😊

Developed by Shajid