1896b82
1
2
3
4
5
6
7
8
9
import { useEffect } from "react" export function useTimeout(duration: number, callback: () => void) { useEffect(() => { setTimeout(() => { callback() }, duration) }, []) }