File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
versioned_docs/version-6.x Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -511,41 +511,41 @@ navigation.popToTop();
511
511
## Example
512
512
513
513
``` js
514
- import { createStackNavigator } from ' @react-navigation/native-stack' ;
514
+ import { createNativeStackNavigator } from ' @react-navigation/native-stack' ;
515
515
516
- const Stack = createStackNavigator ();
516
+ const Stack = createNativeStackNavigator ();
517
517
518
518
function MyStack () {
519
519
return (
520
- < Stack .Navigator
520
+ < NativeStack .Navigator
521
521
initialRouteName= " Home"
522
522
screenOptions= {{
523
523
headerTintColor: ' white' ,
524
524
headerStyle: { backgroundColor: ' tomato' },
525
525
}}
526
526
>
527
- < Stack .Screen
527
+ < NativeStack .Screen
528
528
name= " Home"
529
529
component= {Home}
530
530
options= {{
531
531
title: ' Awesome app' ,
532
532
}}
533
533
/ >
534
- < Stack .Screen
534
+ < NativeStack .Screen
535
535
name= " Profile"
536
536
component= {Profile}
537
537
options= {{
538
538
title: ' My profile' ,
539
539
}}
540
540
/ >
541
- < Stack .Screen
541
+ < NativeStack .Screen
542
542
name= " Settings"
543
543
component= {Settings}
544
544
options= {{
545
545
gestureEnabled: false ,
546
546
}}
547
547
/ >
548
- < / Stack .Navigator >
548
+ < / NativeStack .Navigator >
549
549
);
550
550
}
551
551
```
You can’t perform that action at this time.
0 commit comments