react-native-lockscreen-view
v0.1.0
Published
My new module
Downloads
1
Maintainers
Readme
WIP
View to be appeared in app switcher when app goes to background. Right now, only works on iOS.
Installation
Usage
- Checkout example/ folder
export default function App() {
const [visible, setVisible] = useState(true);
return (
<View style={styles.container}>
<Text>hello world</Text>
<ReactNativeLockscreenView onReset={() => setVisible(true)}>
{visible ? <Passcode hide={() => setVisible(false)} /> : null}
</ReactNativeLockscreenView>
</View>
);
}
const Passcode = ({ hide }) => {
return (
<Modal visible>
<View style={styles.container}>
<Button title="Tap to unlock" onPress={hide} />
</View>
</Modal>
);
};