Nacho Ruiz Martin
09/18/2023, 6:16 AMCoroutineScope
of the executor inside coroutineExecutorFactory
or onIntent
?
I’d like to use the same mechanism as with the previous API for my flows to be automatically cancelled when the scope is disposed.Nacho Ruiz Martin
09/18/2023, 6:19 AMthis
is actually a CoroutineScope
inside onIntent
and onAction
, allowing this:
executorFactory = coroutineExecutorFactory {
onAction<X> {
flow
.onEach{...}
.launchIn(this)
}
}
That’s brilliant, Arkadii. I love this new experimental API.
Maybe this can be documented a bit further, though, I had to deep dive into MviKotlin to find it.Arkadii Ivanov
09/18/2023, 9:14 AMArkadii Ivanov
09/18/2023, 9:15 AM