DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: React useThrottle hook with usage example

Collapse
 
nano1709 profile image
Ignacio Vargas • Edited on

Good post!
Question: So it's 500ms by default, but can it be change to other value/response time and so how?

Collapse
 
loonywizard profile image
Vladimir Nikitin Author

Thanks! Yes, you could pass second argument to useThrottle hook, example for 1000ms:

const throttledValue = useThrottle(value, 1000)
Enter fullscreen mode Exit fullscreen mode