-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathApp.js
39 lines (34 loc) · 759 Bytes
/
App.js
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
/**
* App.js
*
* Root component of the app,
* responsible for setting up routes.
*
*/
// Libs
import React from 'react';
import { View, Text, Button } from 'react-native';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
// Components
import Home from './src/Home';
import Profile from './src/Profile';
/**
* createStackNavigator
*
* Creates a stack of our routes.
*
*/
const Navigator = createStackNavigator({
Home: { screen: Home },
Profile: { screen: Profile },
});
/**
* createAppContainer
*
* Responsible for managing app state and linking
* the top-level navigator to the app environment.
*
*/
const App = createAppContainer(Navigator);
export default App;