When it comes to setting margins for flexbox, I've been creating empty View components with the necessary flex properties. However, I'm curious if there is a more elegant solution to achieve this. Here's an example of what I've been doing:
const MyComponent = () => (
<View style={{ flex: 1, justifyContent: 'space-around', alignItems: 'center'}}>
<View style={{ flex: 1 }} />
<View style={{ flex: 1 }}>
<Text>My real content here</Text>
</View>
</View>
);
You may notice that I use the first inner view to create the desired margin effect. Is there a more elegant (and correct) approach to accomplish this?