Great article with lots of detailed explanations! I'm going to be honest, I haven't read the whole article and the solution. However, I believe you might have solved your problems without entirely changing your UI architecture.

My concern is the following thing that you've mentioned:

The number of parameters quickly became overwhelming, reaching 50+ parameters for complex screens

Why not create a separate ViewModel for each of the screens and just expose the needed flows for certain Composables within the screen? I believe that might have solved the problem

You also mentioned that `collectAsState()` is not lifecycle aware. That's correct, but why not use `collectAsStateWithLifecycle`? Cheers.

Nikolay Miroshnychenko
Nikolay Miroshnychenko

Written by Nikolay Miroshnychenko

Android engineer. Learning daily and sharing my knowledge in the process. Into mobile, computer science, and the brain.

No responses yet