egghead.io
  1. 1
    Use the useState React Hook
    1m 19s
  2. 2
    Test React Components that use React Hooks
    1m 45s
  3. 3
    Share Logic Across Multiple React Components with Custom Hooks
    1m 28s
  4. 4
    Store Values in localStorage with the React useEffect Hook
    3m 13s
  5. 5
    Test Effects Generated from React the useEffect Hook
    3m 49s
  6. 6
    Access and Modify a DOM Node with the React useRef and useEffect Hooks
    3m 4s
  7. 7
    Interact and Update State in React with useState
    5m 6s
  8. 8
    Declaratively Interact with Complex Component State using the React useReducer Hook
    2m 46s
  9. 9
    Simplify a Component Reducer with the React setState Hook
    1m 38s
  10. 10
    Share Complex Logic across React Components with Custom Hooks
    2m 34s
  11. 11
    Detect user activity with a custom useIdle React Hook
    3m 44s
  12. 12
    Prevent Unnecessary Component Rerenders with React memo
    2m 38s
  13. 13
    Lazy Load a React Component with React.lazy and Suspense
    2m 17s
  14. 14
    Learn fundamentals of React Suspense
    3m 30s

Detect user activity with a custom useIdle React Hook

Kent C. Dodds
InstructorKent C. Dodds
  • react
    React

Share this video with your friends

Send Tweet

If the user hasn't used your application for a few minutes, you may want to log them out of the application automatically in case they've stepped away from the machine and someone nefarious attempts to use their session. Let's checkout how you can create a custom React hook that wraps a regular npm module called activity-detector to solve this problem.

illustration for React Hooks and Suspense

Course

React Hooks and Suspense

Build your Developer Portfolio and climb the engineering career ladder.
  • Search
  • Talks
  • Podcasts
  • Machine
  • Pricing
  • Store
©egghead.io
Terms & Conditions