Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Created April 18, 2021 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllGistsEqual/d5461bf3c34e553ff5e98ed9d9c68ddd to your computer and use it in GitHub Desktop.
Save AllGistsEqual/d5461bf3c34e553ff5e98ed9d9c68ddd to your computer and use it in GitHub Desktop.
// File: src/routing/MainNavigation.tsx
import React from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { MainStack, MainRoutes } from './routes'
import SplashScreen from '../screens/SplashScreen'
import AppLoadingScreen from '../screens/AppLoadingScreen'
import HomeScreen from '../screens/HomeScreen'
import SettingsScreen from '../screens/SettingsScreen'
const MainNavigation = (): React.ReactElement => {
return (
<NavigationContainer>
<MainStack.Navigator headerMode="none">
<MainStack.Screen name={MainRoutes.Splash} component={SplashScreen} />
<MainStack.Screen name={MainRoutes.Loading} component={AppLoadingScreen} />
<MainStack.Screen name={MainRoutes.Home} component={HomeScreen} />
<MainStack.Screen name={MainRoutes.Settings} component={SettingsScreen} />
</MainStack.Navigator>
</NavigationContainer>
)
}
export default MainNavigation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment