I'm using a list with a navigation link in my swiftui app, and I'm not using a ForEach loop and trying to put the ".onDelete "method but I don't know how can I do that. Can you help me?
NavigationView {
List(courses) {course in
NavigationLink(destination: CourseDetails(course: course)) {
StudentExtractedCourses(course: course)
}
}
}