Chachako
03/23/2021, 3:05 AMStateFlow
may not be as good as Compose State
?
For
class ViewModel {
val data = mutableStateOf(0)
}
@Composable
fun UI(viewModel: ViewModel) {
val data by viewModel.data
println(data) // 0
}
Is such a thing correct? Is there any important difference between it and LiveData
?