I am using extension function to bind list data to recyclerview , with pagedlist it doesn't need any coroutine
@BindingAdapter("pagedListAdapterData")
fun <T : Any> submitPagedList(recyclerView: RecyclerView, list: PagedList<T>?) {
    if (list != null && recyclerView.adapter is PagedListAdapter<*, *>) {
        (recyclerView.adapter as? PagedListAdapter<T, RecyclerView.ViewHolder>)?.submitList((list))
    }
}
        pagedListAdapterData="@{viewModel.list}"
but as im upgrading to Paging 3.0 it requires the use of coroutine
@BindingAdapter("pagingDataAdapter")
fun <T : Any> submitPagingDataList(recyclerView: RecyclerView, list: PagingData<T>?) {
    if (list != null && recyclerView.adapter is PagingDataAdapter<*, *>) {
        GlobalScope.launch {
            (recyclerView.adapter as? PagingDataAdapter<T, RecyclerView.ViewHolder>)?.submitData((list))
        }
    }
}
this works just fine, but my worry is on the use of Globalscope, seems like there is a better way to do it since globalScope is not recomended
 
     
    