Hello. Does Compose skip composable functions that...
# compose
w
Hello. Does Compose skip composable functions that return a value (other than Unit) when the argument of that function don't change in recomposition?
j
Yeah. Where you write a return statement then it won't render the code below as like you do in business logic
At first if you don't change the argument value then it won't recompose
And when you return a value or just return from unit function then below of the return statement any composable or other code won't be executed
h
If the function is marked as
@Composable
and you don’t change any value it receives, as long as the values are
stable
the function will be skipped
a
No. Composable functions with return values are never skipped currently. See this issue.
💡 1
☝️ 2
w
Thank you @Albert Chang all my tests proved that for days. saved my time!!
h
Interesting, as I see in the docs, there is no mention about that specific behavior. Will add a comment on that issue that if no decision is made to add that clause on the docs thanks!