I'm new to SwiftUI and im trying some things out. I have a List which is being build out of an Array. I want to create a Navigation depending on the row that is clicked. So I've build a struct with the following:
struct DiscoverItem: Hashable, Equatable {
var name: String
var destination: AnyView
}
let arr = [
DiscoverItem(name: "Catalogus", destination: AnyView(ProductList(products: []))),
DiscoverItem(name: "Locations", destination: AnyView(LocationList()))
]
However Xcode is saying
Type 'DiscoverItem' does not conform to protocol 'Equatable'
How can I solve this or which way is the proper way to do this?