What happens, when you don't use "key" in "LazyCo...
# compose
p
What happens, when you don't use "key" in "LazyColumn"? Will the hash of the item be used instead?
f
As per the documentation:
If null is passed the position in the list will represent the key.
👍 2
j
default key value is null.
👆 3
If the key is entered as null, the instance is reused according to the order of each item. For example, if E is added last in A, B, C, D, the previous instance is reused because the order of A, B, C, D is the same. However, if an item is added in the center, the order of C, D is changed so a new instance is allocated.
If a key is provided, the instance is reused even if the order is changed because the key itself caches the item.
p
Thanks for info!
blob hug 1