Skip to content

Commit d68ed50

Browse files
committed
Fix renamed createStackNavigator to createNativeStackNavigator
Documentation was refering to `createStackNavigator` function instead of `createNativeStackNavigator`
1 parent e655d1d commit d68ed50

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

versioned_docs/version-6.x/native-stack-navigator.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,41 +511,41 @@ navigation.popToTop();
511511
## Example
512512

513513
```js
514-
import { createStackNavigator } from '@react-navigation/native-stack';
514+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
515515

516-
const Stack = createStackNavigator();
516+
const NativeStack = createNativeStackNavigator();
517517

518-
function MyStack() {
518+
function MyNativeStack() {
519519
return (
520-
<Stack.Navigator
520+
<NativeStack.Navigator
521521
initialRouteName="Home"
522522
screenOptions={{
523523
headerTintColor: 'white',
524524
headerStyle: { backgroundColor: 'tomato' },
525525
}}
526526
>
527-
<Stack.Screen
527+
<NativeStack.Screen
528528
name="Home"
529529
component={Home}
530530
options={{
531531
title: 'Awesome app',
532532
}}
533533
/>
534-
<Stack.Screen
534+
<NativeStack.Screen
535535
name="Profile"
536536
component={Profile}
537537
options={{
538538
title: 'My profile',
539539
}}
540540
/>
541-
<Stack.Screen
541+
<NativeStack.Screen
542542
name="Settings"
543543
component={Settings}
544544
options={{
545545
gestureEnabled: false,
546546
}}
547547
/>
548-
</Stack.Navigator>
548+
</NativeStack.Navigator>
549549
);
550550
}
551551
```

0 commit comments

Comments
 (0)