Without considering the platform, Kotlin `StateFl...
# compose
c
Without considering the platform, Kotlin
StateFlow
may not be as good as Compose
State
? For
Copy code
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
?