Hello :wave: Can you please confirm if the followi...
# compose
o
Hello 👋 Can you please confirm if the following assertion is true ? Given : a tree of composables
Copy code
+ Parent     // retrieves state from ViewModel, declares fun action on VM
|
|---+ Child A          // passes state without using it, passes action as fun
    |
    |---+ Child A-1        // uses state 
    |
    |---+ Child A-2 
    |
    |---+ Child A-3       // invoke the action fun
When : invoking the passed action by clicking on Child A-3 Then :
Copy code
+ Parent         // will NOT recompose 
|
|---+ Child A          // will recompose (because A-1 recompose) 
    |
    |---+ Child A-1         // will recompose 
    |
    |---+ Child A-2         // will NOT recompose
    |
    |---+ Child A-3         // will NOT recompose
s
repaint --> recompose?
✔️ 1
o
yes (sorry I’m still using legacy android view terms 😅)
k
Is it possible to call
recompose
programmatically? If so, then you can call the same in Child-3 or change the stage Child-A1 using and I think Child A and A-1 will recompose as you're expecting
o
@Kshitij Patil I didn’t really catch your idea, but what I’m sharing is the behaviour of Compose that I have observed. I want just to make sure that my observation is correct.
k
Forget what I said about recomposing, I just believe that your assertion will work