Why is Executor received as a Lambda, but Bootstrap and Reducer are not? #149
-
I’m trying to understand the behavior of the
Any insights or best practices would be appreciated. Code sample: interface Intent {
object DoSomeAction: Intent
object DoAnotherAction: Intent
}
class Executor {
private var job: Job? = null
fun onNewIntent(intent: Intent) {
when(intent) {
DoSomeAction -> {
job = scope.launch {}
}
DoAnotherAction -> {
job?.cancel()
// do something
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Please see the section "Creating the Store" in the docs: https://arkivanov.github.io/MVIKotlin/store.html
The following is also mentioned in that doc:
Here are the answers:
Yes you can.
In general, it's up to the |
Beta Was this translation helpful? Give feedback.
Please see the section "Creating the Store" in the docs: https://arkivanov.github.io/MVIKotlin/store.html
The following is also mentioned in that doc:
Here are the answers:
Yes you can.