Nov 21, 2023
As I covered, you don't swap out the view model, you swap out the dependencies on which the view model is based (loader in this example).
Doing so allows your previews to test and exercise your actual view model code. If you swap out your entire VM, then you can test your view, but you have no idea if your VM's logic is correct or contains hidden issues.