got a tricky situation, I would like to set a label for some element to be XYZ `only` if its the fir...
o
got a tricky situation, I would like to set a label for some element to be XYZ
only
if its the first time that this composable is being shown if I set
isFirstTime
as a Boolean, and I then change the label (which is remembered) then recomposition happens and isFirstTime is initialized again as false and then it repeats and i fall into the
isFirstTime == false
condition again if I set
isFirstTime
to remember, then changing it to
true
after the first time has happened, this will also trigger recomposition and then it automatically falls into the
isFirstTime
is true in the same recomposition that just happened
I guess i need to work with state here as well
a
Use LaunchedEffect
o
You can’t call composable from that