2019-11-22a few seconds read (About 52 words)How to use index in SwiftUI listIssue #515 Use enumerated and id: \.element.name 1234567891011121314151617181920struct CountriesView: View { let countries: [Country] var body: some View { let withIndex = countries.enumerated().map({ $0 }) return List(withIndex, id: \.element.name) { index, country in NavigationLink( destination: CountryView(country: country), label: { VStack(alignment: .leading) { Text(country.name) .styleMultiline() } .paddingVertically() } ) } }}#swiftUI