I am working on a React Native project. The container's flexDirection
is set to column
and I want the child's width to span 80% of the parent. If the parent's flexDirection
was set to row
I would have set the flex
value to 0.8
and be done with it. The restrictions are
- I can't have an additional container around the child.
- I can't give the child a fixed width in pixels.
Here is a playground to fiddle with the problem.