0.1.0 • Published 4 years ago
@hooks/timeout v0.1.0
🎒 @hooks/timeout
React hook to delay function execution
Install
npm i @hooks/timeout
Usage
useTimeout
useTimeout(callback: Function, delay?: number): void
Parameters
callback: Function
Will be executed when the delay
elapses.
delay?: number
Length of time in milliseconds before the callback
is executed. Providing null
will clear the timeout.