-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathHomeScreen.tsx
35 lines (29 loc) · 982 Bytes
/
HomeScreen.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
import React from 'react';
import { View, Button, Text, StyleSheet, SafeAreaView } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
export function HomeScreen(props: any) {
return (
<View style={{ ...styles, flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text style={{ fontSize: 40 }}>Home Screen</Text>
<Text style={{ fontSize: 20 }}>Welcome to the Home screen</Text>
<Button
title="Go to Details"
onPress={() => {
props.navigation.navigate('Details', {
userId: 1,
userName: 'Awesome User',
});
}
}
/>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});