Issue #483
Every item in list must be uniquely identifiable
List {
ForEach(books, id: \.bookId) { book in
NavigationLink(destination:
BookView(book: book)
.navigationBarTitle(book.name)
) {
VStack {
Text(book.name)
}
}
}
}
In case of primitive, we can just provide id
to conform to Identifiable
extension String: Identifiable {
public var id: String {
return self
}
}