Last active
March 24, 2018 18:40
-
-
Save gutomarzagao/9d5d9aecb99fa5d4eb4646fe6bb07866 to your computer and use it in GitHub Desktop.
React Native bug
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
| import React, { Component } from 'react'; | |
| import { | |
| View, | |
| StyleSheet, | |
| Image, | |
| } from 'react-native'; | |
| const styles = StyleSheet.create({ | |
| root: { | |
| flex: 1, | |
| }, | |
| header: { | |
| height: 300, | |
| backgroundColor: 'blue', | |
| }, | |
| content: { | |
| flex: 1, | |
| alignItems: 'center', | |
| justifyContent: 'center', | |
| // backgroundColor: 'green', | |
| }, | |
| image: { | |
| width: 250, | |
| resizeMode: 'contain', | |
| backgroundColor: 'red', | |
| }, | |
| }); | |
| const someImage = require('../img/empty.png'); | |
| export default class App extends Component { | |
| render() { | |
| return ( | |
| <View style={styles.root}> | |
| <View style={styles.header} /> | |
| <View style={styles.content}> | |
| <Image source={someImage} style={styles.image} /> | |
| </View> | |
| </View> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment