Exercise 1: Swipe-to-Delete with onDelete(perform:) — Possible Solution ============================================================================== // Added to TaskStore: func delete(at offsets: IndexSet) { tasks.remove(atOffsets: offsets) } // Updated TaskListView's List: List { Section { QuoteHeaderView() } Section("Tasks") { ForEach(store.tasks) { task in NavigationLink(value: task) { TaskRow(task: task) } } .onDelete { offsets in store.delete(at: offsets) } } } HOW IT WORKS: TaskStore.delete(at:) takes a real IndexSet - the exact type SwiftUI's own real .onDelete(perform:) modifier hands back when the user performs a swipe-to-delete gesture on one or more rows - and forwards it directly to Array's own real remove(atOffsets:) method, which removes every element at those specific positions from tasks in one call. .onDelete is attached directly to the ForEach (not the whole List or Section), which is the real, required placement - it needs to know specifically which dynamic, ForEach-generated rows the deletion gesture applies to. Because tasks is a property on the shared @Observable TaskStore, removing an item there automatically updates every view holding that same store instance (per this chapter's own finding-box) - TaskListView's own List immediately reflects the deletion with no separate refresh step needed. ANSWER: Adding func delete(at offsets: IndexSet) to TaskStore (calling tasks.remove(atOffsets: offsets)) and attaching .onDelete { store.delete(at: $0) } directly to the ForEach inside the "Tasks" Section correctly enables real swipe-to-delete, with the shared @Observable store automatically propagating the removal back to the list's own display. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly implements the real onDelete(perform:) pattern attached to the ForEach specifically, and forwards the resulting IndexSet to a new TaskStore method using the real, matching Array API.