0.1.0 • Published 6 years ago
@hooks/interval
Licence
MIT
Version
0.1.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0
@hooks/interval
React hook to wrap setInterval
Install
npm i @hooks/interval
Usage
useInterval
useInterval(callback: Function, interval?: number | null): void
Parameters
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.