react-native-lock-appstate
v0.1.0
Published
test
Downloads
7
Readme
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