We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69a78e0 commit 6b39b42Copy full SHA for 6b39b42
example/src/App.tsx
@@ -1,17 +1,10 @@
1
-import { multiply } from '@logicwind/react-native-exit-app';
2
-import { Text, View, StyleSheet } from 'react-native';
3
-import { useState, useEffect } from 'react';
+import { Button, StyleSheet, View } from 'react-native';
+import { exitApp } from '@logicwind/react-native-exit-app';
4
5
export default function App() {
6
- const [result, setResult] = useState<number | undefined>();
7
-
8
- useEffect(() => {
9
- multiply(3, 7).then(setResult);
10
- }, []);
11
12
return (
13
<View style={styles.container}>
14
- <Text>Result: {result}</Text>
+ <Button title="Exit App" onPress={() => exitApp()} />
15
</View>
16
);
17
}
0 commit comments