2.3.9 Nested Views Codehs
: Place child components inside a parent .
Name your style keys logically (e.g., mainContainer , nestedLeftSquare ) rather than generic names like view1 or view2 .
To successfully complete exercise 2.3.9, you must follow a logical nesting order. 2.3.9 nested views codehs
: Use StyleSheet.create to define the height, width, and background colors for your nested boxes.
Nesting allows you to apply borders, padding, and rounded corners to specific sub-sections of a screen without affecting the entire page layout. : Place child components inside a parent
<!-- THE NESTED VIEW STARTS HERE --> <!-- This layout sits inside the main vertical layout --> <LinearLayout android:
The styles are usually predefined in a separate AppStyles.js file. However, it's helpful to understand them: : Use StyleSheet
Text components inside deeply nested views sometimes clip off the edge of the screen. To fix this, ensure the inner container has clear constraints or uses flexShrink: 1 .
Key attributes you will manipulate in this exercise include:
import React from 'react';