Skip to content

Commit 6b39b42

Browse files
Example setup
1 parent 69a78e0 commit 6b39b42

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

example/src/App.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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';
1+
import { Button, StyleSheet, View } from 'react-native';
2+
import { exitApp } from '@logicwind/react-native-exit-app';
43

54
export default function App() {
6-
const [result, setResult] = useState<number | undefined>();
7-
8-
useEffect(() => {
9-
multiply(3, 7).then(setResult);
10-
}, []);
11-
125
return (
136
<View style={styles.container}>
14-
<Text>Result: {result}</Text>
7+
<Button title="Exit App" onPress={() => exitApp()} />
158
</View>
169
);
1710
}

0 commit comments

Comments
 (0)