React Idle Timer
react-idle-timer
Activity detection for React.js
Utilities
react
idle
idle timer
timer
activity
active
timeout
session
session expiration
session timeout
Stars
1.2k
Weekly
0
Open issues
41
Bundle
~60 kB
Installation
npm install react-idle-timerCode example
import { useIdleTimer } from "react-idle-timer";
export function Example() {
const value = useIdleTimer();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Randy Lebeau
- 0 weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~60 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 41 open issues on GitHub