NavigationStack with path initializer giving me "No exact matches in call to initializer "

My code:
struct ListView: View {
@State private var presentedViews: [DayView] = [DayView(date: "March 23")]
  
  var body: some View {
    NavigationStack(path: $presentedViews)  { // ERROR: No exact matches in call to initializer 
      List {
        ForEach(items, id: \.self) { item in
          NavigationLink(destination: DayView(date: item)) {
            Text(item)
          }
        }
      }
    }
  }
}


I'm following Apple's documentation on this (swift-developmentNavigationStack with path initializer giving me "No exact matches in call to initializer ") yet I get this error when I'm (seemingly) doing everything the same.
The only difference I can see is that I'm not using the .navigationDestination modifier, but I doubt that that's mandatory as it doesn't state that anywhere.

Any ideas? Thanks in advance, I'm stuck on this
Was this page helpful?