mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
6 lines
172 B
TypeScript
6 lines
172 B
TypeScript
import { useState } from 'react';
|
|
import useSetInterval from 'use-set-interval';
|
|
|
|
const [ count, setCount ] = useState(0);
|
|
useSetInterval(() => setCount(count + 1), 1000);
|