File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
website/static/examples/5.x Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import { View , Button , Text } from 'react-native' ;
3
- import {
4
- NavigationContainer ,
5
- CommonActions ,
6
- } from '@react-navigation/native' ;
3
+ import { NavigationContainer , CommonActions } from '@react-navigation/native' ;
7
4
import { createStackNavigator } from '@react-navigation/stack' ;
8
5
9
- function HomeScreen ( { navigation, route } ) {
6
+ function HomeScreen ( { navigation } ) {
10
7
return (
11
8
< View style = { { flex : 1 , alignItems : 'center' , justifyContent : 'center' } } >
12
9
< Text > Home!</ Text >
@@ -86,15 +83,15 @@ function ProfileScreen({ navigation, route }) {
86
83
) ;
87
84
}
88
85
89
- const Tab = createStackNavigator ( ) ;
86
+ const Stack = createStackNavigator ( ) ;
90
87
91
88
export default function App ( ) {
92
89
return (
93
90
< NavigationContainer >
94
- < Tab . Navigator >
95
- < Tab . Screen name = "Home" component = { HomeScreen } />
96
- < Tab . Screen name = "Profile" component = { ProfileScreen } />
97
- </ Tab . Navigator >
91
+ < Stack . Navigator >
92
+ < Stack . Screen name = "Home" component = { HomeScreen } />
93
+ < Stack . Screen name = "Profile" component = { ProfileScreen } />
94
+ </ Stack . Navigator >
98
95
</ NavigationContainer >
99
96
) ;
100
97
}
You can’t perform that action at this time.
0 commit comments