mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-24 09:42:43 +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);
|