Exercise 2: A Reusable StatusBadge View — Possible Solution ================================================================== struct StatusBadge: View { let label: String let color: Color var body: some View { Text(label) .padding(6) .background(color) .clipShape(.capsule) } } struct ContentView: View { var body: some View { VStack { StatusBadge(label: "Active", color: .green) StatusBadge(label: "Pending", color: .orange) } } } HOW IT WORKS: StatusBadge is a plain struct conforming to View, with two real stored properties - label (a String) and color (a Color) - both declared with let, since a badge's own text and color are fixed once created rather than something the badge itself needs to change internally. Its body composes a single Text with the same padding/background/clipShape chain from the chapter's own BadgeView example, but using the instance's own label and color properties instead of hardcoded values. Using StatusBadge(label: "Active", color: .green) and StatusBadge(label: "Pending", color: .orange) inside ContentView's own VStack creates two genuinely separate instances - each is a real, independent struct value (per Chapter 4's own value-type behavior), so each one's own label and color are entirely its own, producing two differently-labeled, differently-colored badges stacked vertically. ANSWER: StatusBadge, a struct conforming to View with let label and let color properties, renders as a padded, colored, capsule-clipped Text. Using it twice with different label/color arguments produces two independent badge instances - "Active" in green and "Pending" in orange - each fully configured by its own constructor arguments. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly defines a reusable, parameterized View struct following the chapter's own subview-extraction pattern, and demonstrates it being reused twice with different configuration, exactly as a real reusable component is meant to be used.