-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApp.js
30 lines (28 loc) · 927 Bytes
/
App.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
29
30
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Screen1 from './src/screens/posts';
import Screen2 from './src/screens/detail';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
const Stack = createNativeStackNavigator();
const App = () => {
return (
<GestureHandlerRootView style={{flex: 1}}>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
presentation: 'transparentModal',
}}>
<Stack.Screen
name="Posts"
component={Screen1}
options={{headerShown: true}}
/>
<Stack.Screen name="Detail" component={Screen2} />
</Stack.Navigator>
</NavigationContainer>
</GestureHandlerRootView>
);
};
export default App;