Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 275 Bytes

use-interval.md

File metadata and controls

11 lines (8 loc) · 275 Bytes

useInterval

Executes a side-effect on an interval (represented as milliseconds). The default interval is 1000ms.

Example

useInterval(() => {
  console.log('it has been 1000ms since the last time this was logged!');
}, [/* effect dependencies */], 1000);