1import * as React from 'react';
2import { Text, View } from 'react-native';
3import { NavigationContainer } from '@react-navigation/native';
4import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
5
6function HomeScreen() {
7 return (
8 <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
9 <Text>Home!</Text>
10 </View>
11 );
12}
13
14function SettingsScreen() {
15 return (
16 <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
17 <Text>Settings!</Text>
18 </View>
19 );
20}
21
22const Tab = createBottomTabNavigator();
23
24export default function App() {
25 return (
26 <NavigationContainer>
27 <Tab.Navigator>
28 <Tab.Screen name="Home" component={HomeScreen} />
29 <Tab.Screen name="Settings" component={SettingsScreen} />
30 </Tab.Navigator>
31 </NavigationContainer>
32 );
33}