While using lazyColumn and composables containing ...
# compose
c
While using lazyColumn and composables containing remember/rememberSaveable, how to go about this? I feel like I knew how to handle this kind of situation before in RecyclerViews and I’m failing to intuitively use this correctly. This should happen with any example of a composable with remember inside of lazyColumn. For example I was trying to have this edit text inside of my row items, consequentially I needed a remember and I noted that the wrong items where being deleted, just to realize that I was being fooled by cell reusability. Another way I solved this was with limited items where I would go with Item{ ItemWithRememberHere() } Item{ ItemWithRememberHere() } But some times you will need to present an X amount of items and this will not work. What am I missing?
d
item
has a
key
parameter for this sorta thing.
☝🏽 1
☝🏻 1
c
Interesting, I’ve been using key inside of the remember statement as a crutch 😛 I knew it was something obvious