In Compose, while creating Composables like ScreenA
(where they would represent the entire screen content), is it a good option to pass in the entire viewmodel as a parameter to the Composable? I mean the values are stored there inside the viewmodel. The same value needs (if), to be accessed from multiple screens like that, how do I read those values. Can I initialize a viewmodel inside the composable, and rest assured that the same instance as the rest of the app will be delivered, or should I just pass in the required value (not viable, I think, since there can be many values over time as development goes through) as a parameter to the Composable?
Using a factory should be a viable solution, really.