-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
39 lines (35 loc) · 941 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
35
36
37
38
39
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/
import React, {useState} from 'react';
import {StyleSheet, View} from 'react-native';
import Footer from './src/components/Footer';
import Welcome from './src/components/Welcome';
import Header from './src/components/Header';
import LoadingContext from './src/components/context/LoadingContext';
const App = () => {
const [isLoading, setIsLoading] = useState(false);
return (
<LoadingContext.Provider value={{isLoading, setIsLoading}}>
<View style={styles.root}>
<Header />
<Welcome />
<Footer />
</View>
</LoadingContext.Provider>
);
};
const styles = StyleSheet.create({
root: {
flex: 1,
backgroundColor: '#FFF',
padding: 20,
},
});
export default App;