|
@@ -1,5 +1,5 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
|
-import { View, Text, StatusBar, Button } from 'react-native';
|
|
2
|
+import { View, Text, StatusBar } from 'react-native';
|
3
|
3
|
|
4
|
4
|
// import { SafeAreaProvider, useSafeArea } from 'react-native-safe-area-context'; in your app.
|
5
|
5
|
import {
|
|
@@ -48,16 +48,9 @@ const Screen = () => {
|
48
|
48
|
};
|
49
|
49
|
|
50
|
50
|
export default function App() {
|
51
|
|
- const [refreshKey, setRefreshKey] = React.useState(1);
|
52
|
51
|
return (
|
53
|
|
- <View key={refreshKey} style={{ flex: 1 }}>
|
54
|
|
- <SafeAreaProvider>
|
55
|
|
- <Screen />
|
56
|
|
- <Button
|
57
|
|
- title="Refresh"
|
58
|
|
- onPress={() => setRefreshKey(state => state + 1)}
|
59
|
|
- />
|
60
|
|
- </SafeAreaProvider>
|
61
|
|
- </View>
|
|
52
|
+ <SafeAreaProvider>
|
|
53
|
+ <Screen />
|
|
54
|
+ </SafeAreaProvider>
|
62
|
55
|
);
|
63
|
56
|
}
|