useIdle

Detect when the user has not interacted with the page for a while.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Stay still for three seconds.

APIs

useIdle

const useIdle = (
  timeout: number,
  options?: { events?: string[]; initialState?: boolean },
) => boolean
Edit this page on GitHub