-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
32 lines (27 loc) · 849 Bytes
/
App.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
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import LoginScreen from './src/screens/LoginScreen';
import HomeScreen from './src/screens/HomeScreen';
import {enableScreens} from 'react-native-screens';
enableScreens();
type RootStackParamList = {
Login: undefined;
Home: undefined;
};
const Stack = createStackNavigator<RootStackParamList>();
const App: React.FC = () => {
return (
<NavigationContainer>
<Stack.Navigator
initialRouteName="Login"
screenOptions={{
headerShown: false,
}}>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Home" component={HomeScreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;