Hi, what is the difference between these two function definition, in terms of when the backing MutableState changes?
fun Demo (coin: State<Int>) vs
fun Demo(coin: Int)
a
Albert Chang
06/20/2021, 1:18 PM
If these are composable functions, I don’t think there’s any difference but you should use the latter form as the parameter doesn’t necessarily have to be a
State
.
s
Shakil Karim
06/20/2021, 2:36 PM
@Albert Chang Yes, it is Composable functions, thanks i though latter one won,t recompose when it's data changes.