Monday, 4 February, 2019 UTC


Summary

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`](https://www.npmjs.com/package/activity-detector) to solve this problem.