Answers for "react native view two columns"

1

react native view two columns

<View style={styles.container}>
  <View style={styles.item}>
    ...
  </View>
</View>

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'row',
    flexWrap: 'wrap',
    alignItems: 'flex-start' // if you want to fill rows left to right
  },
  item: {
    width: '50%' // is 50% of container width
  }
})
Posted by: Guest on September-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language