-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack-nav.js
28 lines (25 loc) · 919 Bytes
/
stack-nav.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import PhotoWall from './views/photo-wall';
import Login from './views/login';
import HomeScreen from './views/home';
import Image from './views/Image';
import { NavigationContainer } from '@react-navigation/native';
const Stack = createStackNavigator();
function MyStack() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} options={{ title: '主页' }} />
<Stack.Screen
name="PhotoWall"
component={PhotoWall}
options={{ title: '相册' }}
/>
<Stack.Screen name="Login" component={Login} options={{ title: '设置' }} />
<Stack.Screen name="Image" component={Image} options={{ title: '图片预览' }} />
</Stack.Navigator>
</NavigationContainer>
);
}
export default MyStack;