use-interval
Wrapper around window.setInterval
Import
Source
Docs
Package
Usage
Page loaded 0 seconds ago
API
Arguments:
fn
– function that will be called at each interval tickinterval
– amount of milliseconds between each tick
Return object:
start
– start intervalstop
– stop intervaltoggle
– toggle intervalactive
– current interval status