-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
35 lines (31 loc) · 1.29 KB
/
App.js
File metadata and controls
35 lines (31 loc) · 1.29 KB
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
import 'react-native-gesture-handler';
import React from 'react';
import Homescreen from "./src/Pages/Home/Homescreen.js"
import Aboutscreen from "./src/Pages/About/Aboutscreen.js"
import Connected from "./src/Pages/Connected/Connected.js"
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
// Main component of this application
// App will control all of our main components: Home, Connect
// and About, which will be our 'pages'.
const App = () => {
// We are using Stack Navigation to control the
// navigation between pages
const Stack = createStackNavigator();
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home" screenOptions={{ headerShown: false }} >
{/*
Our app has three main pages: Home, Connect and About.
'Home' is the landing page of our app;
'Connect' is the page with connection to our broker;
'About' is an informative page with app version and our team number.
*/}
<Stack.Screen name="Home" component={Homescreen} />
<Stack.Screen name="Connect" component={Connected} />
<Stack.Screen name="About" component={Aboutscreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;