Timeouts
React hooks that wrap setTimeout().
This is a collection of timeout based hooks.
For rate-limiting use useThrottle()
or useDebounce()
. For pure timeouts use useTimeout()
or useTimeoutEffect()
.
All of these hooks will automatically take care of clearing any pending timeouts that you set if the component unmounts for example.