Skip to content

Latest commit

 

History

History

timeout

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/timeout

React hook to delay function execution

NPM version Travis License

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.