Hi there community, I would like to hear your reco...
# compose-android
k
Hi there community, I would like to hear your recommendation. It would be good to make this in the IU
Copy code
LaunchedEffect(Unit) {
    launch(Dispatchers.Main) {
        paginatedRecentOrders.refresh()
    }
}
or it should be in the viewmodel is to refresh a PagingData
i
You should never need to do this. If you've built your PagingSource correctly, it will automatically invalidate when your data changes. We actually just talked about a similar case on Twitter: https://twitter.com/ianhlake/status/1692754799387640043
k
Thank you so much 🙌
Do you have any example that can help me to do it perfectly.