OVH Cloud OVH Cloud

2.3.9 Nested Views Codehs -

2.3.9 Nested Views Codehs -

Aligns items to the start or end edge. Code Structure for Exercise 2.3.9

Acts as the parent container for the nested blocks. It has fixed dimensions and sets flexDirection: 'row' to place the two inner boxes side-by-side. 2.3.9 nested views codehs

Remember that changing the flexDirection flips the axes. When flexDirection: 'row' is applied, justifyContent controls horizontal alignment, and alignItems controls vertical alignment. Aligns items to the start or end edge

Distributes items with equal space around each item. 3. alignItems Remember that changing the flexDirection flips the axes

innerBoxOne and innerBoxTwo sit directly inside the outer box. innerBoxOne is also styled as a Flexbox container ( justifyContent and alignItems ) because it holds a nested grandchild block.

Nested views are created when one View component is placed inside another. This structure forms a that controls how UI elements are layered and positioned.

If a parent component has a fixed size but the child has a style of flex: 1 without explicit dimensions, the child might collapse to 0 height or width.

Commentaires

La discussion est réservée aux membres GNT

Commencez par créer un compte ou vous identifier