1
2var styles = StyleSheet.create({
3 content:{
4 flex:1,
5 flexDirection:'row',
6 alignItems:'center',
7 justifyContent:'center'
8 },
9 …
10});
1// Add these styles to a parent element (could be a view)
2
3const styles = StyleSheet.create({
4 parent:{
5 flex:1, // Covers the available space
6 justifyContent:"center", // aligns through main axis
7 alignItems:"center" // aligns though secondary axis
8 }
9});