Skip to content

Update code samples in Stack Navigator docs to correctly use defaultNavigationOptions in navigator config #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/stack-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const ModalNavigator = createStackNavigator(
{
headerMode: 'none',
mode: 'modal',
navigationOptions: {
defaultNavigationOptions: {
gesturesEnabled: false,
},
transitionConfig: () => ({
Expand Down Expand Up @@ -321,4 +321,4 @@ const HomeStack = createStackNavigator(
{ DetailScreen, HomeScreen, OptionsScreen },
{ initialRouteName: 'HomeScreen', transitionConfig: dynamicModalTransition }
);
```
```
12 changes: 6 additions & 6 deletions website/versioned_docs/version-3.x/stack-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ Visual options:
* `cardShadowEnabled` - Use this prop to have visible shadows during transitions. Defaults to `true`
* `cardOverlayEnabled` - Use this prop to have visible stack card overlays during transitions. Defaults to `false`.
* `transitionConfig` - Function to return an object that is merged with the default screen transitions (take a look at TransitionConfig in [type definitions](
https://github.com/react-navigation/react-navigation/blob/master/flow/react-navigation.js)). Provided function will be passed the following arguments:
* `transitionProps` - Transition props for the new screen.
* `prevTransitionProps` - Transitions props for the old screen.
https://github.com/react-navigation/react-navigation/blob/master/flow/react-navigation.js)). Provided function will be passed the following arguments:
* `transitionProps` - Transition props for the new screen.
* `prevTransitionProps` - Transitions props for the old screen.
* `isModal` - Boolean specifying if screen is modal.
* `onTransitionStart` - Function to be invoked when the card transition animation is about to start.
* `onTransitionEnd` - Function to be invoked once the card transition animation completes.
Expand Down Expand Up @@ -160,7 +160,7 @@ Style object for the header

#### `headerForceInset`

Allows to pass `forceInset` object to internal SafeAreaView used in the header.
Allows to pass `forceInset` object to internal SafeAreaView used in the header.

#### `headerTitleStyle`

Expand Down Expand Up @@ -262,7 +262,7 @@ const ModalNavigator = createStackNavigator(
{
headerMode: 'none',
mode: 'modal',
navigationOptions: {
defaultNavigationOptions: {
gesturesEnabled: false,
},
transitionConfig: () => ({
Expand Down Expand Up @@ -322,4 +322,4 @@ const HomeStack = createStackNavigator(
{ DetailScreen, HomeScreen, OptionsScreen },
{ initialRouteName: 'HomeScreen', transitionConfig: dynamicModalTransition }
);
```
```