Skip to content

Instantly share code, notes, and snippets.

@vaibhavgehani
Last active August 17, 2022 16:58
Show Gist options
  • Save vaibhavgehani/5d795f9f6ccc33d3bd8b80a7ac59466c to your computer and use it in GitHub Desktop.
Save vaibhavgehani/5d795f9f6ccc33d3bd8b80a7ac59466c to your computer and use it in GitHub Desktop.
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';
import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import ChatScreen from './Screens/ChatScreen/ChatScreen';
import PasswordScreen from './Screens/PasswordScreen/PasswordScreen';
import { createStackNavigator } from '@react-navigation/stack'
import { NavigationContainer } from '@react-navigation/native';
const Stack = createStackNavigator();
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName='password'>
<Stack.Screen options={{title: 'Enter password'}} name='password' component={PasswordScreen} />
<Stack.Screen options={{title: 'Chat', headerBackTitle: 'Logout'}} name='chat' component={ChatScreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment