I have a list of items composed via LazyColumn. If...
# compose
c
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
By using
State<>
objects and only calling
.value
inside the item lambda. Hard to explain without code.
a
Specify a custom key for each item.
d
What code snippet?
c
@Albert Chang Tried with specifying key, but it still doesn't work.
d
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
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.