As far as I understood, each part of code which is related to any state will be changed(recomposed) with state changes →
And each state is an observable and the dependent UI part observes that state and is subscribed to it(the state) and whenever the state changes it will be notified(redrawing that part of UI) and happening recomposition.
But here in this article of google Thinking in compose, it says that recomposition happens with changing input, so I am confused.
Recomposition is the process of calling your composable functions again when inputs change. This happens when the function's inputs change. When Compose recomposes based on new inputs, it only calls the functions or lambdas that might have changed, and skips the rest. By skipping all functions or lambdas that don't have changed parameters, Compose can recompose efficiently.
Also, here in other sample of compose-roadmap, encourage hoisting the state to make the composable function stateless to avoid recompositions
So it would be great, if someone can make it clear that the recompositions happens only with state changes or input changes also causes?
Thank you in advance for your help