Licence
MIT
Version
0.1.0
Deps
0
Size
65 kB
Vulns
0
Weekly
0
react-native-lock-appstate
Screen lock detection for react native
Installation
npm install react-native-lock-appstate
Usage
import useAppState from 'react-native-lock-appstate';
useAppState((state) => {
if (state === 'active') {
// Action if state is actived
}
if (state === 'background') {
// Action if state is background
}
if (state === 'sleepLock' || state === 'buttonLock') {
// Action if state is locked
}
// Next states...
});
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library