forked from wednesday-solutions/react-native-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppNavigator.js
22 lines (22 loc) · 920 Bytes
/
AppNavigator.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import SplashScreen from '@scenes/SplashScreen/';
import ExampleScreen from '@scenes/ExampleScreen';
import { NavigationContainer } from '@react-navigation/native';
import NavigationService from '../services/NavigationService';
const Stack = createStackNavigator();
/**
* The root screen contains the application's navigation.
*
* @see https://reactnavigation.org/docs/en/hello-react-navigation.html#creating-a-stack-navigator
*/
export default function AppNavigator() {
return (
<NavigationContainer ref={NavigationService.setTopLevelNavigator}>
<Stack.Navigator headerMode="none" initialRouteName="SplashScreen">
<Stack.Screen name="SplashScreen" component={SplashScreen} />
<Stack.Screen name="MainScreen" component={ExampleScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}