Skip to content

Instantly share code, notes, and snippets.

@hayanisaid
Created February 26, 2020 22:59
Show Gist options
  • Save hayanisaid/0c6e784e05fbd7b3456e6d54db12b5ef to your computer and use it in GitHub Desktop.
Save hayanisaid/0c6e784e05fbd7b3456e6d54db12b5ef to your computer and use it in GitHub Desktop.
import React from 'react';
import {SafeAreaView, StyleSheet, View, Text, StatusBar} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
const App: () => React$Node = () => {
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView style={styles.containerStyle}>
<AppNavigation />
</SafeAreaView>
</>
);
};
const Stack = createStackNavigator();
const AppNavigation = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="home">
<Stack.Screen name="home" component={HomeScreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
const HomeScreen = () => {
return (
<View style={styles.containerStyle}>
<Text style={styles.title}>Home Screen</Text>
</View>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment