Package Exports
- @hooks/interval
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/interval) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🎒 @hooks/interval
React hook to wrap setInterval
Install
npm i @hooks/intervalUsage
useInterval
useInterval(callback: Function, interval?: number | null): voidParameters
callback: Function
Will be executed each time the interval elapses.
interval?: number | null
Length of time in milliseconds before the callback is executed. Providing null will clear the interval.