``` fun loadProducts() = launch(context = coroutin...
# coroutines
k
Copy code
fun loadProducts() = launch(context = coroutineContext, parent = job) {
       viewState.postValue(Loading())
        channel = productDataStore.loadProducts(job, coroutineContext)
        channel.consumeEach { products ->
            val uiModel = ProductsUiModel(products)
            viewState.postValue(Success(uiModel))
        }
    }