Can anyone please explain whats going on in this circumstance:
Take the following basic flex layout in HTML:
<div style="background-color:grey; ">
<div style="padding:5px; background-color:red; display:flex">
<div style="flex:3; background-color:blue">
hi
</div>
<div style="flex:1; background-color:yellow">
do
</div>
</div>
</div>
Which as expected renders like this -
I wanted to use a similar structure in a React Native project and it renders completely differently:
Heres the code:
<View
style={{flexDirection: 'column', padding: 5, backgroundColor: 'red' }}>
<View style={{backgroundColor: 'blue', flex:1}}><Text>hi</Text></View>
<View style={{backgroundColor: 'yellow', flex:2}}><Text>do</Text></View>
</View>
This shows a red column only - content inside disappears.

However if i switch the flexDirection to 'row' it works as you expect the 'column' to work. i.e. -
Confusing my mind this afternoon! Can anyone please explain whats going on here!?

