fixed initialRouteName documentation (#121)

https://github.com/react-community/react-navigation/issues/119
This commit is contained in:
Nicolas Beck
2017-02-01 03:26:42 +01:00
parent 747c61a3d6
commit 8ccca19e82
3 changed files with 6 additions and 6 deletions

View File

@@ -84,10 +84,10 @@ const MyApp = TabNavigator({
Several options get passed to the underlying router to modify navigation logic:
- `initialTab` - The routeName for the initial tab route when first loading
- `initialRouteName` - The routeName for the initial tab route when first loading
- `order` - Array of routeNames which defines the order of the tabs
- `paths` - Provide a mapping of routeName to path config, which overrides the paths set in the routeConfigs.
- `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialTab`, otherwise `none`. Defaults to `initialTab` behavior.
- `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialRoute`, otherwise `none`. Defaults to `initialRoute` behavior.
### `tabBarOptions` for `TabBarBottom` (default tab bar on iOS)

View File

@@ -9,7 +9,7 @@ const MyApp = TabRouter({
Home: { screen: HomeScreen },
Settings: { screen: SettingsScreen },
}, {
initialTab: 'Home',
initialRouteName: 'Home',
})
```
@@ -46,10 +46,10 @@ Each item in the config may have the following:
Config options that are also passed to the router.
- `initialTab` - The routeName for the initial tab route when first loading
- `initialRouteName` - The routeName for the initial tab route when first loading
- `order` - Array of routeNames which defines the order of the tabs
- `paths` - Provide a mapping of routeName to path config, which overrides the paths set in the routeConfigs.
- `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialTab`, otherwise `none`. Defaults to `initialTab` behavior.
- `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialRoute`, otherwise `none`. Defaults to `initialRoute` behavior.
### Supported Actions

View File

@@ -106,7 +106,7 @@ const CustomTabRouter = TabRouter({
},
}, {
// Change this to start on a different tab
initialTab: 'Home',
initialRouteName: 'Home',
});
const CustomTabs = createNavigationContainer(createNavigator(CustomTabRouter)(CustomTabView));