SwiftUI - Router Pattern

The coordinator pattern is a pattern often used when developing iOS apps using UIKit. It enables developers to separate navigation logic from view logic, resulting in reusable and testable code. In this post, David Gary Wood demonstrates an equivalent pattern implemented with SwiftUI, which he calls the router pattern.