This example shows how a growing ViewModel is split into workflow pieces.
See BeforeLoginViewModel.swift.
The ViewModel owns:
- loading state
- validation
- async API calls
- navigation callbacks
- error messages
- retry behavior
See:
The workflow now owns behavior. A SwiftUI model or UIKit controller only adapts the flow to UI.