I have the same problem.
@State private var path: [Route] = []
NavigationStack(path: $path) {
Button("Settings") {
path.append(.settings)
}
.navigationDestination(for: Route) { route in
if route == .setting {
SettingsView()
} else {
EmptyView()
}
}
}
If i use NavigationLink in SettingsView, and there is a @Appstorage variable in it, will lead to an infinite loop.
Can NavigationStack(with NavigationPath binding) and NavigationLink be used together?