I am trying to create a view with a frame around it that is centered and fills 80% of the screen. I came up with this:
<View style={{flexDirection: 'row'}}> <View style={{flex: .1}} /> <View style={{flex: .8, borderWidth: 2}} /> <View style={{flex: .1}} /> </View>
which works, but seems terribly detailed.
Is there a better (more concise) way to create a view that is a certain percentage of the width of the screen and is centered on the page?
source share