I have a LazyColumn which show a MutableStateList ...
# compose
n
I have a LazyColumn which show a MutableStateList of items: is it normal that when I update a single item in the list, all the visible items get recomposed? even though I they do not change in any way
s
Do you provide the
key
for each item?
n
yes
z
I believe that is a known issue with lazy lists right now, yes.
n
oh ok, , thank you very much. I thought I was doing something wrong (and maybe I am anyway 😁)
z
Within each list item, most of the composition should end up getting skipped if nothing has changed.
n
That's the problem: all items in the screen get recomposed. In my particular case, I'm updating a single field (quantity) in a single item in the list. Nevertheless, even though only one item has changed, even the others get recomposed. In particular, the composable holding the "quantity" value gets recomposed in every single item in the lazy column