Is there some convention about `modifier`s passed ...
# compose
t
Is there some convention about `modifier`s passed as param? Should it be
modifier
and then the local modifiers or local modifiers first and then
.then(modifier)
?
s
modifier
first in the chain
t
What’s the use of
then
?
s
Copy code
.moreModifiersInTheChain()
.then(
  if (someCondition) {
    Modifier.clickable()
  } else {
    Modifier
  }
)
.moreModifiersInTheChain()
is a good example
with
apply
, you are not actually returning the modifier you just edited,
apply
returns the receiver just as it was before the block inside did anything. It's the same as doing
Copy code
val x = 5.apply {
  this + 1
}
println(x) // <-- prints (5)
t
Yeah sorry, I realised that 😅