UNPKG

react-debounce-func

Version:
43 lines (28 loc) 898 B
<!-- <a href="https://github.com/Skolaczk/next-starter/blob/main/README.md/"> --> # react-debounce-func It's a debounce react hook, which takes two parameter - Function to be debounced - Duration time --- 1. First Install the package ```bash npm install react-debounce-func ``` 2. Import and call ```js 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 <a href="https://dev-shajid.vercel.app/">Shajid</a>