https://kotlinlang.org logo
#compose
Title
# compose
e

eygraber

09/20/2023, 2:49 AM
If I'm displaying a list of item in a
Column
(specifically not a
LazyColumn
) should I be wrapping all of the item composables in a call to
key
?
v

Vlad

09/20/2023, 8:19 AM
I see no reasons to if the Items param are stable.
f

Filip Wiesner

09/20/2023, 12:39 PM
should I be wrapping all of the item composables in a call to
key
Depends if the content of the Column is changing in time or is just displayed and never updated. If you "change order" of the items without using the key, Compose runtime won't see it as a change of order but only as change of input params. So for example
remember
calls will not "move" with the item and will stay on the same place. I hope it makes sense 😄 I am bad at explaining these things
e

eygraber

09/20/2023, 2:23 PM
No, it makes sense, thank you!
🎉 1