useInterval Function
Beta
Hook that create an interval and clears it when unloaded Reference: https://github.com/gaearon/overreacted.io/blob/master/src/pages/making-setinterval-declarative-with-react-hooks/index.md
useInterval(callback: (...args: any[]) => void, delay: undefined | number): void
Parameter | Type | Description |
---|---|---|
callback | (...args: any[]) => void | |
delay | undefined | number |
Returns - void
Defined in
Last Updated: 20 June, 2023