With the "Auto Logout" approach implemented in the previous lecture, you'll very likely get a warning like this on Android:

Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981

What's the problem?

Using setTimeout() with a big timeout duration (as we're setting it => 1 hour), can't be handled in the most efficient way by Android. Unfortunately, there is no perfect solution available though but you can browse the referenced issue thread for possible workarounds: https://github.com/facebook/react-native/issues/12981