react-debounce-func

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i react-debounce-func

Weekly Downloads

4

Version

1.0.1

License

ISC

Unpacked Size

2.08 kB

Total Files

4

Last publish

Collaborators

  • shajib729