function still can't seem to do it!
Sorry! Thanks! π₯΄
m
Michael Paus
02/26/2022, 12:05 PM
I believe your thinking is wrong here. You should call a normal function which triggers some state change in your model to which your composable functions then can react to.
k
Kebbin
02/26/2022, 12:07 PM
Haha! I've been reading up on the new Thinking in Compose docs etc, and still must've missed something! Well, a lot really maybe...
Thanks for your attention. I might just have to do some more reading.
Can you give me a pointer where I can find the right way to make my @Composable functions react to stuff properly? Thanks! βΊοΈ
Kebbin
02/26/2022, 12:20 PM
OK.................
I think I might've finally got it! I had been using
remember
from habit, because of simple examples I've been building on, and my simple app had been able to handle that obviously!
I've now got things working I think, using just
var dataIn = mutableStateOf("")
for example, and my @Composables seem to be updating live when it changes????
Hopefully this is right! Gee, what a learning experience. Thanks anyway!!
Kebbin
02/26/2022, 12:22 PM
And the
remember
idea might help me with another problem I was having, where I wanted a variable to be set/copied from another variable, but then remain unchanged as the original one varied!!? Wow. Good stuff. @darkmoon_uk will be proud of me, if I can get this into my head! This might've been worth staying up late for, if I can have learnt this!!!