Skip to content

Instantly share code, notes, and snippets.

@artyorsh
Last active October 22, 2019 15:22
Show Gist options
  • Save artyorsh/1da5cdafff478ff4ca0c7b76930f0aa2 to your computer and use it in GitHub Desktop.
Save artyorsh/1da5cdafff478ff4ca0c7b76930f0aa2 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 { TodoNavigator } from './todo.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={TodoNavigator}/>
</Stack.Navigator>
</NavigationNativeContainer>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment