android10 / android10/Android-CleanArchitecture-Kotlin
abstract class UseCase actual layer placement?
Aberta
- Linguagem predominante
- Kotlin
- Estrelas
- 4.8k
- Forks
- 929
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
```
abstract class UseCase where Type : Any {
abstract suspend fun run(params: Params): Either
operator fun invoke(params: Params, onResult: (Either) -> Unit = {}) {
val job = async(CommonPool) { run(params) }
launch(UI) { onResult(job.await()) }
}
class None
}
```
I've somewhat confused with this. Does this abstract class use case violate the domain layer? Usecase should be dumb and doesn't know the coroutines?
cmiiw @android10
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.