【SwiftUI】NavigationLinkとNavigationPathを使った遷移機能の実装 - Qiita

はじめにどうも、iOS駆け出しエンジニアのはるさんです。今回はNavigationLinkとNavigationPathを使った遷移について説明していきたいと思います。私は今までUIKitを…

Qiita

When using a #NavigationStack in #SwiftUI, it seems more efficient to have the navigation path in a State passed as a Binding than using an #ObservableObject passed as an #EnvironmentObject.

According to Self._printChanges in the body of the Views, the latter redraws all the Views in the hierarchy when the path is modified (destination is appended or removed). E.g. the root View even if you are 10 Views in the #NavigationPath.

Have I missed something? 🤔