Coordinator pattern
Also called: Router
An object that owns navigation for a flow, so screens only report what happened and never open other screens themselves.
Definition
Screens expose callbacks such as onOrderSelected or onSaved; the coordinator creates screens, wires those callbacks and decides what comes next. Coordinators form a tree: an app coordinator starts child flows such as login or checkout, which report a result when they finish and are then released. With state-driven navigation (SwiftUI NavigationStack(path:), Compose navigation graphs) the coordinator becomes a router that owns the navigation state. Deep links become coordinator methods that build the right stack.
In practice
The address form calls onSaved(address); the checkout coordinator pops back to the summary, the settings coordinator shows a banner.