1 min readJan 6, 2020
If you need logic to transition from state A to state B, then that logic needs to live somewhere. Placing it into a viewModel lets us run unit/integration tests on that code.
Even this simple example has state for loading the image, processing flags, error handling, etc., and real word apps are usually no where near this simple.