1 min readJun 7, 2019
When the complexity increases, the complexity increases. ;)
Regardless, the end goal is to keep as much of that complexity as you can in the view model where it can be tested.
One might, for example, map the data into an array of arrays, with each sub-array being a mapped struct indicating the type of cell to construct, the cell’s title, etc..
Then you can feed the VM dummy data and ensure that everything maps out as it should.