I have found a workaround using NavigationPath instead of an array of Route in my NavigationModel
class NavigationModel: ObservableObject {
static let shared = NavigationModel()
@Published var selectedTab: String
@Published var homePath: NavigationPath
@Published var testPath: NavigationPath
}
Edit: It fixes the "push twice" issue but NavigationStack still acts weirdly, even though the path is correct, some views are not correctly popped.
Removing the TabView still fixes all issues so I think the TabView is buggy.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: