mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
Removed prepended window from setTimeout
This commit is contained in:
parent
3b6b72385a
commit
698399938d
@ -9,7 +9,7 @@ export default function useTimeoutFn(fn: Function, ms: number = 0): UseTimeoutFn
|
||||
const isReady = useCallback(() => ready.current, []);
|
||||
const set = useCallback(() => {
|
||||
ready.current = false;
|
||||
timeout.current = window.setTimeout(() => {
|
||||
timeout.current = setTimeout(() => {
|
||||
ready.current = true;
|
||||
fn();
|
||||
}, ms);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user