0.1.0 • Published 4 years ago

@hooks/timeout v0.1.0

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

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