You're pushing multiple stacks that share the same path. So one stack is trying to push another stack which is trying to push the other stack.... It's a happy coincidence that ObservableObject doesn't infinite loop, I'm surprised it does not. 2 general rules will help when using the navigation system: move navigationDestination modifiers as high up in the view hierarchy. This is more efficient for the Navigation system to read up front than with potentially every view update. Don't push stacks onto stacks, and try to avoid entire NavigationStacks coming and going from the columns of a NavigationSplitView. NSV will adopt the stack and integrate its state with the state of the whole split view. I ran this example on macOS and it looked as expected import SwiftUI import OSLog final class NavigationModel: ObservableObject { @Published var path = NavigationPath() { didSet { print(navigationModel.path.count: (path.count)) } } } struct Report: Hashable { var title: String = Report Title } private let logger
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: