-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
44 lines (39 loc) · 1011 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
40
41
42
43
44
import React from "react";
import { StyleSheet, Text, View, Image, Button, ActivityIndicator } from "react-native";
import { NativeRouter, Route, Link, BackButton } from 'react-router-native'
import Questions from "./src/screens/Questions";
import Home from "./src/screens/Home";
import About from "./src/screens/About";
export default class App extends React.Component {
render() {
return (
<NativeRouter>
<View style={styles.container}>
<BackButton />
<Route path='/questions' component = {Questions} />
<Route path='/about' component = {About} />
<Route exact path='/' component = {Home} />
</View>
</NativeRouter>
);
}
}
const styles = StyleSheet.create({
container: {
display: 'flex',
height: '100%',
marginTop: 20,
},
header: {
fontSize: 20,
fontWeight: "bold"
},
info: {
fontSize: 16,
color: "#777",
textAlign: "center",
padding: 10,
marginTop: 15,
lineHeight: 25
}
});