I have a list of items composed via LazyColumn. If any one of the item gets changed in the list, how can I make sure only that particular item of LazyColumn gets recomposed instead of the entire LazyColumn.
d
Dominaezzz
07/10/2021, 12:19 PM
By using
State<>
objects and only calling
.value
inside the item lambda. Hard to explain without code.
@Albert Chang Tried with specifying key, but it still doesn't work.
d
Dominaezzz
07/10/2021, 4:53 PM
Don't think you can avoid re-composition, you're creating new order objects. Real question here I guess is why do you care?
c
chansek
07/10/2021, 5:03 PM
Isn't it going to hit performance? I mean that's the reason, notifyItemInserted(), etc. methods got introduced in RecyclerView, even though notifyDataSetChanged() was already there.