Advertisement
AnoTest

navigator.js

Jan 28th, 2022
767
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { createNativeStackNavigator } from '@react-navigation/native-stack';
  3. import Home from '../screens/Home';
  4. import LoginPage from '../screens/loginPage';
  5. import DrawerStackNavigator from './DrawerNavigator';
  6.  
  7.  
  8. const Stack = createNativeStackNavigator();
  9.  
  10. // const screenOptionStyle = {
  11. //     headerShown = false
  12. // }
  13.  
  14. export default class HomeStackNavigator extends React.Component {
  15.    
  16.     render(){
  17.     return (
  18.         <Stack.Navigator
  19.         initialRouteName="Login"
  20.        
  21.         >
  22.            
  23.            <Stack.Screen
  24.                
  25.                 name= "Home"
  26.                 component={DrawerStackNavigator}
  27.                 options={{ title: 'Home' ,headerShown:false}}
  28.                 />
  29.                 <Stack.Screen
  30.                
  31.                 name= "Login"
  32.                 component={LoginPage}
  33.                 options={{ title: 'Login' }}
  34.                 />
  35.          
  36.         </Stack.Navigator>
  37.     )
  38.     }
  39. }
  40.  
  41. // export default HomeStackNavigator;
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement