Skip to content

Instantly share code, notes, and snippets.

@artyorsh
Created October 23, 2019 14:43
Show Gist options
  • Save artyorsh/465107fed5961c49f8ede3849d5d1097 to your computer and use it in GitHub Desktop.
Save artyorsh/465107fed5961c49f8ede3849d5d1097 to your computer and use it in GitHub Desktop.
App Navigator with Auth and Home screens (Binding React Navigation 5 to Eva Design System)
import React from 'react';
import { NavigationNativeContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { AuthNavigator } from './auth.navigator';
import { HomeNavigator } from './home.navigator';
import { AppRoute } from './app-routes';
const Stack = createStackNavigator();
export const AppNavigator = (config): React.ReactElement => (
<NavigationNativeContainer>
<Stack.Navigator {...config} headerMode='none'>
<Stack.Screen name={AppRoute.AUTH} component={AuthNavigator}/>
<Stack.Screen name={AppRoute.HOME} component={HomeNavigator}/>
</Stack.Navigator>
</NavigationNativeContainer>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment