Created
April 18, 2021 19:15
-
-
Save AllGistsEqual/917056541b0edfa37863e42b7e337eb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: src/routing/routes.ts | |
import { createStackNavigator } from '@react-navigation/stack' | |
export enum MainRoutes { | |
Splash = 'Splash', | |
Loading = 'Loading', | |
Home = 'Home', | |
Settings = 'Settings', | |
} | |
export type MainStackParamList = { | |
[MainRoutes.Splash]: undefined | |
[MainRoutes.Loading]: undefined | |
[MainRoutes.Home]: { update: boolean } | undefined // just an example, "update" will later be used for version checks | |
[MainRoutes.Settings]: undefined | |
} | |
export const MainStack = createStackNavigator<MainStackParamList>() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment