UNPKG

@ducor/hooks

Version:

A collection of useful React hooks for building modern web applications. Includes hooks for clipboard operations, window events, intervals, timeouts, and more.

11 lines (10 loc) 334 B
export interface IdleOptions { events?: (keyof DocumentEventMap)[]; initialState?: boolean; } /** * `useIdle` is a custom hook that detects whether the user has been idle for a certain amount of time in milliseconds. * */ declare const useIdle: (timeout?: number, options?: IdleOptions) => boolean; export default useIdle;