@hooks/interval
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

🎒 @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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @hooks/interval

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

3.71 kB

Total Files

6

Last publish

Collaborators

  • simmo