Skip to content

Commit 446fec0

Browse files
levibuzolicvonovak
authored andcommitted
Update code samples in Stack Navigator docs to correctly use defaultNavigationOptions in navigator config (#316)
1 parent 6d5b6ff commit 446fec0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/stack-navigator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const ModalNavigator = createStackNavigator(
261261
{
262262
headerMode: 'none',
263263
mode: 'modal',
264-
navigationOptions: {
264+
defaultNavigationOptions: {
265265
gesturesEnabled: false,
266266
},
267267
transitionConfig: () => ({
@@ -321,4 +321,4 @@ const HomeStack = createStackNavigator(
321321
{ DetailScreen, HomeScreen, OptionsScreen },
322322
{ initialRouteName: 'HomeScreen', transitionConfig: dynamicModalTransition }
323323
);
324-
```
324+
```

website/versioned_docs/version-3.x/stack-navigator.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ Visual options:
7171
* `cardShadowEnabled` - Use this prop to have visible shadows during transitions. Defaults to `true`
7272
* `cardOverlayEnabled` - Use this prop to have visible stack card overlays during transitions. Defaults to `false`.
7373
* `transitionConfig` - Function to return an object that is merged with the default screen transitions (take a look at TransitionConfig in [type definitions](
74-
https://github.com/react-navigation/react-navigation/blob/master/flow/react-navigation.js)). Provided function will be passed the following arguments:
75-
* `transitionProps` - Transition props for the new screen.
76-
* `prevTransitionProps` - Transitions props for the old screen.
74+
https://github.com/react-navigation/react-navigation/blob/master/flow/react-navigation.js)). Provided function will be passed the following arguments:
75+
* `transitionProps` - Transition props for the new screen.
76+
* `prevTransitionProps` - Transitions props for the old screen.
7777
* `isModal` - Boolean specifying if screen is modal.
7878
* `onTransitionStart` - Function to be invoked when the card transition animation is about to start.
7979
* `onTransitionEnd` - Function to be invoked once the card transition animation completes.
@@ -160,7 +160,7 @@ Style object for the header
160160

161161
#### `headerForceInset`
162162

163-
Allows to pass `forceInset` object to internal SafeAreaView used in the header.
163+
Allows to pass `forceInset` object to internal SafeAreaView used in the header.
164164

165165
#### `headerTitleStyle`
166166

@@ -262,7 +262,7 @@ const ModalNavigator = createStackNavigator(
262262
{
263263
headerMode: 'none',
264264
mode: 'modal',
265-
navigationOptions: {
265+
defaultNavigationOptions: {
266266
gesturesEnabled: false,
267267
},
268268
transitionConfig: () => ({
@@ -322,4 +322,4 @@ const HomeStack = createStackNavigator(
322322
{ DetailScreen, HomeScreen, OptionsScreen },
323323
{ initialRouteName: 'HomeScreen', transitionConfig: dynamicModalTransition }
324324
);
325-
```
325+
```

0 commit comments

Comments
 (0)