Created
February 12, 2018 11:47
-
-
Save dharavp/2cf55aa10adda1e91b098e5284cf58b4 to your computer and use it in GitHub Desktop.
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 {AppRegistry,View}from ‘react - native’; | |
export default class FlexDirectionBasics extends Component { | |
render() { | |
return ( | |
<View style = { | |
{ | |
flex: 1, | |
flexDirection: ‘column’ | |
} | |
} > //changed flexDirection to row and you get fig. 1.2 as a result. | |
< View style = {{width: 50,height: 50,backgroundColor: ‘powderblue’}} /> | |
< View style = {{width: 50,height: 50,backgroundColor: ‘skyblue’}} /> | |
< View style = {{width: 50,height: 50,backgroundColor: ‘steelblue’}} /> | |
</View>); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment