Feb 4, 2024
A view model's area of responsibility is its own view.
I'd also avoid passing VM's into child views. The fact that a view has a view model (or not) should be private to the view. Exposing it to the outside complicates that calling sites and makes refactoring those views more problematic.
You've also got a lot of boilerplate here, which would be nice to eliminate. Should consider trying to reduce this down to a view modifier similar to that of navigationDestination.