Created
August 13, 2022 02:16
-
-
Save PhilipWee/303c14bf0925aca2fd927161fb31931a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@ts-nocheck (We will handle the typescript later) | |
function useDebounce(func, delay) { | |
const debouncedFunction = (...args) => { | |
setTimeout(() => { | |
console.log("This runs after (delay) ms"); | |
}, delay); | |
}; | |
return debouncedFunction; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment