0.1.0 • Published 6 years ago
@hooks/timeout v0.1.0
🎒 @hooks/timeout
React hook to delay function execution
Install
npm i @hooks/timeoutUsage
useTimeout
useTimeout(callback: Function, delay?: number): voidParameters
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.