-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
39 lines (36 loc) · 1.15 KB
/
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
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable react/jsx-filename-extension */
import React, { Component } from 'react';
// import react Navigation
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Start from './components/Start';
import Chat from './components/Chat';
// import react native gesture handler
import 'react-native-gesture-handler';
const firebase = require('firebase');
require('firebase/firestore');
// Create the navigator
const Stack = createStackNavigator();
export default class App extends Component {
render() {
return (
<NavigationContainer>
<Stack.Navigator
// First screen to load upon launching the app - value has to be one of the Stack.Screen-s
initialRouteName="Start"
>
<Stack.Screen
// Name doesn't have to match the component's name
name="Home"
component={Start}
/>
<Stack.Screen
name="Chat"
component={Chat}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
}