This exposition explains the concept and practice of nested views as presented in CodeHS-style curricula (often in web/app UI contexts using HTML/CSS/JS or simple UI frameworks). It covers what nested views are, why they’re useful, common patterns, pitfalls, and concrete examples with code and step-by-step explanations so you can apply the concept.
To complete this exercise correctly, your code must meet the following criteria:
: Ensure you have View , StyleSheet , and Text (if needed) imported from 'react-native' .
Exercise 2.3.9 forces you to practice this relative positioning.
Note: I assume a typical CodeHS environment where you build simple web or GUI layouts with containers, views (panels/divs), layout properties, and basic event handling. If you want examples for a specific framework (p5.js, Karel, React, SwiftUI, etc.), say which and I’ll adapt.
// event handling: event bubbles from item to list/app item.addEventListener('click', (e) => e.currentTarget.style.background = '#def'; console.log('Item clicked'); );