add missing initalRouteKey property on NavigationStackRouterConfig (#25590)

This commit is contained in:
Thomas Sawkins
2018-05-09 03:14:13 +10:00
committed by Sheetal Nandi
parent a62e6431c7
commit a62969017a
2 changed files with 4 additions and 1 deletions

View File

@@ -20,7 +20,7 @@
// TypeScript Version: 2.6
/**
* Reference: https://github.com/react-navigation/react-navigation/tree/a37473c5e4833f48796ee6c7c9cb4a8ac49d9c06
* Reference: https://github.com/react-navigation/react-navigation/tree/3f3ef6485c8932f49fddc3dd2c508629110bf2b6
*
* NOTE: Please update the commit/link above when updating to a new Flow
* react-navigation/flow/react-navigation.js reference, so we can conveniently just look at diffs on
@@ -313,6 +313,7 @@ export interface NavigationStackRouterConfig {
initialRouteParams?: NavigationParams;
paths?: NavigationPathsConfig;
navigationOptions?: NavigationScreenConfig<NavigationScreenOptions>;
initialRouteKey?: string;
}
export type NavigationStackAction =

View File

@@ -50,6 +50,7 @@ const viewStyle: ViewStyle = {
};
const ROUTE_NAME_START_SCREEN = "StartScreen";
const ROUTE_KEY_START_SCREEN = "StartScreen-key";
interface StartScreenNavigationParams {
id: number;
@@ -131,6 +132,7 @@ export const AppNavigator = StackNavigator(
routeConfigMap,
{
initialRouteName: ROUTE_NAME_START_SCREEN,
initialRouteKey: ROUTE_KEY_START_SCREEN,
initialRouteParams,
navigationOptions,
},