react-native-session-length
v0.0.1
Published
Provides a simple callback with how long it as been since user last activated the app.
Downloads
2
Readme
react-native-session-length
#Why If you want to timeout people's sessions or show something when they have opened the app for the first time in a while. This covers the both use-cases of :
- Bringing the app to the foreground.
- Opening the app from force close.
#Usage
import SessionLength from 'react-native-session-length';
SessionLength((milliseconds)=>{
console.log(`It has been ${milliseconds}ms since you last opened the app.`;
});