/App.js Secret
Created
November 1, 2021 08:01
Signal-Clone App.js file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { StyleSheet } from 'react-native' | |
import { NavigationContainer } from '@react-navigation/native' | |
import { createNativeStackNavigator } from '@react-navigation/native-stack' | |
import LoginScreen from './screens/LoginScreen' | |
import RegisterScreen from './screens/RegisterScreen' | |
import HomeScreen from './screens/HomeScreen' | |
import AddChatScreen from './screens/AddChatScreen' | |
import ChatScreen from './screens/ChatScreen' | |
const Stack = createNativeStackNavigator() | |
const globalScreenOptions = { | |
headerStyle: { backgroundColor: '#2c68ed' }, | |
headerTitleStyle: { color: 'white' }, | |
headerTintColor: 'white', | |
} | |
export default function App() { | |
return ( | |
<NavigationContainer> | |
<Stack.Navigator screenOptions={globalScreenOptions}> | |
<Stack.Screen name="Login" component={LoginScreen} /> | |
<Stack.Screen name="Register" component={RegisterScreen} /> | |
<Stack.Screen name="Home" component={HomeScreen} /> | |
<Stack.Screen name="AddChat" component={AddChatScreen} /> | |
<Stack.Screen name="Chat" component={ChatScreen} /> | |
</Stack.Navigator> | |
</NavigationContainer> | |
) | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: '#fff', | |
alignItems: 'center', | |
justifyContent: 'center', | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment