Created
May 30, 2017 03:44
-
-
Save ridgeO/f81e79c1957a0f035f4006d32145a5cc to your computer and use it in GitHub Desktop.
Code snippet from ReactNav application as featured in http://platypus.is/posts/4
This file contains hidden or 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
# App.js | |
... | |
class GreenScreen extends Component { | |
render() { | |
return( | |
<View style={styles.green}> | |
<Text style={styles.text}>This is the Green Screen</Text> | |
</View> | |
); | |
} | |
} | |
class RedScreen extends Component { | |
render() { | |
return( | |
<View style={styles.red}> | |
<Text style={styles.text}>This is the Red Screen</Text> | |
</View> | |
); | |
} | |
} | |
class BlueScreen extends Component { | |
render() { | |
return( | |
<View style={styles.blue}> | |
<Text style={styles.text}>This is the Blue Screen</Text> | |
</View> | |
); | |
} | |
} | |
class PurpleScreen extends Component { | |
render() { | |
return( | |
<View style={styles.purple}> | |
<Text style={styles.text}>This is the Purple Screen</Text> | |
</View> | |
); | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment