use-interval
Calls function in given interval
Import
Source
Docs
Package
Usage
Page loaded 0 seconds ago
API
Arguments:
fn
– function that is called at each interval tickinterval
– amount of milliseconds between each tick
Return object:
start
– start intervalstop
– stop intervaltoggle
– toggle intervalactive
– current interval status