react-debounce-func
v1.0.1
Published
this is a debounce-function
Downloads
14
Maintainers
Readme
react-debounce-func
It's a debounce react hook, which takes two parameter
- Function to be debounced
- Duration time
First Install the package
npm install react-debounce-func
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