-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
34 lines (29 loc) · 840 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React, { useEffect } from "react";
import { ScrollView } from "react-native-gesture-handler";
import { StyleSheet } from "react-native";
import Home from "./src/Pages/Home";
import { Updates } from "expo";
import { StatusBar } from 'expo-status-bar';
var styles = StyleSheet.create({
scrollView: {
flex: 1,
},
});
export default function App() {
useEffect(() => {
async function updateApp() {
const { isAvailable } = await Updates.checkForUpdateAsync();
if (isAvailable) {
await Updates.fetchUpdateAsync();
await Updates.reloadAsync();
} //return the function itself to reference
}
updateApp()
}, []);
return (
<ScrollView style={styles.scrollView} contentContainerStyle={{ flex: 1 }}>
<StatusBar style="light" />
<Home />
</ScrollView>
);
}