Skip to content

Latest commit

 

History

History

interval

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/interval

React hook to wrap setInterval

NPM version Travis License

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.