Last active
January 16, 2019 03:14
-
-
Save vdelacou/8cf1f58a400fda59b5d3158e278b57da to your computer and use it in GitHub Desktop.
React navigation Detail Screen example
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, { PureComponent } from "react"; | |
import { StyleSheet, Text, View } from "react-native"; | |
import { NavigationScreenProps } from "react-navigation"; | |
/** | |
* The Details screen | |
*/ | |
export class DetailScreen extends PureComponent<NavigationScreenProps> { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.title}>Details Screen</Text> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: "center", | |
alignItems: "center", | |
backgroundColor: "#F5FCFF" | |
}, | |
title: { | |
fontSize: 20, | |
textAlign: "center", | |
margin: 10 | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment