mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
fix(useIdle): include 'ms' prop in uesEffect dependencies
This commit is contained in:
parent
49a86a848c
commit
7a670a2e6d
@ -46,7 +46,7 @@ const useIdle = (ms: number = oneMinute, initialState: boolean = false, events:
|
||||
}
|
||||
off(document, 'visibilitychange', onVisibility);
|
||||
};
|
||||
}, events);
|
||||
}, [ms, events]);
|
||||
|
||||
return state;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user