Skip to content

Instantly share code, notes, and snippets.

@streetsmartdev
Created September 2, 2017 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streetsmartdev/900594150d769df88ab5bdfc6969107a to your computer and use it in GitHub Desktop.
Save streetsmartdev/900594150d769df88ab5bdfc6969107a to your computer and use it in GitHub Desktop.
RN-RNav-1 - Initial LoginScreen
import React from "react";
import {StyleSheet} from "react-native";
import {Button, Text, View} from "react-native";
class LoginScreen extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>React navigator - Login</Text>
<Button
onPress={() => this.props.navigation.navigate("Internal")}
title="Login"
/>
</View>
);
}
}
LoginScreen.navigationOptions = {
title: "Login"
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
title: {
fontSize: 20,
textAlign: 'center',
margin: 10,
}
});
export default LoginScreen;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment