What happens, when you don't use "key" in "LazyCo...
# compose
What happens, when you don't use "key" in "LazyColumn"? Will the hash of the item be used instead?
As per the documentation:
If null is passed the position in the list will represent the key.
👍 2
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.
Thanks for info!
blob hug 1