Are there any up-to-date code samples that show ho...
# compose
r
Are there any up-to-date code samples that show how state works, all the way from the Composable functions, thru the ViewModel, to the persistence layer? The examples I see are all contrived and stop at the ViewModel (like this State Codelab). I guess a real app needs at least one more layer, so that the user can navigate back to a screen and see the same data/state that they left. Am I supposed to use MutableState<T>'s in this deeper layer? If not, how do I avoid multiple sources of truth? Ie, copying from a "repository" to a ViewModel's MutableState properties?