Colton Idle
03/10/2024, 5:57 PM@Composable
fun Testing() {
val myValue by asdf.collectAsState(initial = "nunya")
LaunchedEffect(token) { Log.e("ABC", "LE with $myValue") }
...
}
val asdf = flow { repeat(10){
emit("a")
delay(2000)
}
}
Why does the above output
13:53:45.647 E LE with a
13:53:45.756 E LE with a
I was expecting LE with nunya
and then LE with a
, but why is it LE with a, twice?Colton Idle
03/10/2024, 6:09 PMStylianos Gakis
03/10/2024, 6:20 PMMR3Y
03/10/2024, 6:42 PMasdf
initializtion which happens on the current frame.