Package Exports
- @hooks/timeout
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hooks/timeout) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🎒 @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.