Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 647 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 647 Bytes

🎒 @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.