<mutableStateListOf change not reflecting in UI - ...
# stackoverflow
u
mutableStateListOf change not reflecting in UI - Jetpack Compose in my ViewModel: private val _itemList = mutableStateListOf() val itemList: List = _itemList fun likePost(newPost: Post){ val index = _itemList.indexOf(newPost) _itemList[index] = _itemList[index].copy(isLiked = true) } Here my Post data class: data class Post( val id: Int, val name: String, val isLiked: Boolean = false, ) And here my Composable: val postList = viewModel.itemList LazyRow(content = { items(postList.size) { i -> val postItem =...