Flow Navigation With SwiftUI 4
<p>Having just revisited this navigation for SwiftUI 3 <a href="https://betterprogramming.pub/flow-navigation-with-swiftui-revisited-791f89421923" rel="noopener ugc nofollow" target="_blank">here</a> (which updated the original approach for SwiftUI 1 <a href="https://medium.com/swlh/flow-with-swiftui-and-mvvm-7cc394440ab8" rel="noopener">here</a>), Apple has since rethought navigation with the new <code>NavigationStack</code> as part of the latest SwiftUI 4 release. This is great news… and covers most of my previous suggestions!</p>
<p>Previously, <code>NavigationView</code> required explicitly defining navigation “edges” and the use of multiple flags which could lead to confusion. The new approach uses a stack creating a non-UI representation of the existing navigation and works beautifully with our previous programmatic approach without many changes.</p>
<p>This approach initially started with a review of a multiscreen onboarding flow with SwiftUI. As with all multiscreen data entry flows, they often represent an interesting problem of how to decouple data, view, and navigation logic.</p>
<p><a href="https://betterprogramming.pub/flow-navigation-with-swiftui-4-e006882c5efa"><strong>Read More</strong></a></p>