Three modules, one navigation model
The core holds the state. The renderers draw it, in SwiftUI or UIKit, or both in one app.
import WaypointCore
WaypointCore
The UI-agnostic navigation state engine behind Waypoint: stacks, presentations and tabs as plain, observable values.
import WaypointWaypoint
Draw Waypoint navigation with SwiftUI.
import WaypointUIKitWaypointUIKit
Draw Waypoint navigation with UIKit, and mix it with SwiftUI.
A route is a value
Name each screen with a small type, and let the coordinator decide where it goes.
// Conformances: // - Route, so a coordinator can push it and logs can name it. struct ProductRoute: Route { let id: Product.ID } func showProduct(id: Product.ID) { navigator.push( ProductRoute(id: id) ) }