0
0
React Nativemobile~5 mins

Flexbox layout (flexDirection, justifyContent, alignItems) in React Native - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does flexDirection control in a Flexbox layout?

flexDirection sets the main axis direction for the layout. It decides if items are placed in a row (horizontally) or a column (vertically).

Click to reveal answer
beginner
Explain justifyContent in Flexbox.

justifyContent aligns children along the main axis (the direction set by flexDirection). It controls how space is distributed between and around items.

Click to reveal answer
beginner
What is the role of alignItems in Flexbox?

alignItems aligns children along the cross axis (perpendicular to the main axis). It controls vertical or horizontal alignment depending on flexDirection.

Click to reveal answer
intermediate
If flexDirection is row, which axis does justifyContent affect?

It affects the horizontal axis, arranging items left to right or with space between them horizontally.

Click to reveal answer
intermediate
How does alignItems: center affect children in a Flexbox with flexDirection: column?

It centers children horizontally because the cross axis is horizontal when the main axis is vertical.

Click to reveal answer
In React Native Flexbox, what is the default value of flexDirection?
Acolumn
Brow
Crow-reverse
Dcolumn-reverse
Which justifyContent value places items at the end of the main axis?
Aflex-start
Bcenter
Cflex-end
Dspace-between
What does alignItems: stretch do by default?
ACenters items on cross axis
BStretches items to fill cross axis
CAligns items to start of cross axis
DAligns items to end of cross axis
If flexDirection is row, which axis is the cross axis?
AVertical
BHorizontal
CDiagonal
DNone
Which property controls spacing between items along the main axis?
AflexWrap
BalignItems
CflexDirection
DjustifyContent
Describe how flexDirection, justifyContent, and alignItems work together in a React Native Flexbox layout.
Think about main and cross axes and how items are arranged horizontally or vertically.
You got /4 concepts.
    Explain what happens visually when you set flexDirection: row, justifyContent: space-between, and alignItems: center in a React Native Flexbox container.
    Imagine a row of boxes spaced apart with vertical alignment in the middle.
    You got /3 concepts.