Skip to content

Instantly share code, notes, and snippets.

@dharavp
Created February 12, 2018 11:47
Show Gist options
  • Save dharavp/2cf55aa10adda1e91b098e5284cf58b4 to your computer and use it in GitHub Desktop.
Save dharavp/2cf55aa10adda1e91b098e5284cf58b4 to your computer and use it in GitHub Desktop.
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