Join Slack
Powered by
Is there a way to update a property item(data clas...
# compose
a
AmrJyniat
09/27/2022, 9:58 AM
Is there a way to update a property item(data class) inside a
mutableStateListOf
without creating a new list then assign it to the original
mutableStateListOf
?
z
Zaki Shaikh
09/27/2022, 10:12 AM
Hope this work stateList[index] = stateList [index].copy(x=y)
a
AmrJyniat
09/27/2022, 10:40 AM
Yah that's work perfectly, Thanks man
z
Zach Klippenstein (he/him) [MOD]
09/27/2022, 2:41 PM
In general, `SnapshotStateList`s can be modified in-place without having to create a new list - that’s their whole reason for existing.
108
Views
Open in Slack
Previous
Next