--

My argument against that is there's no reason your view/composables can't break apart that single screen level view state into multiple smaller view states. (Just map it and slice out the portion of the singular view model you need. Hand that off to the composable.)

That works just fine with recomposition. It shouldn't be the responsibility of the android view model to do that for you. It will dramatically clean up your android view model and squarely places the responsibility of managing the screen level view state into the things that manage it.

IMO a single source of truth is better than multiple sources of truth, even if coming from the same android view model.

--

--

Michael Ferguson
Michael Ferguson

Written by Michael Ferguson

Android software developer. Views and opinions expressed are my own and not that of my employer.

No responses yet