hook for detecting when a user is idle
npm install use-idle> hook for detecting when a user is idle (wrapper around activity-detector)
 
``bash`
npm install --save use-idle
`jsx
import React from "react";
import { useIdle } from "use-idle";
const Example = () => {
const isIdle = useIdle();
useEffect(() => {
isIdle && alert("You've gone idle!");
}, [isIdle]);
return
MIT © @mayteio
---
This hook is created using create-react-hook.