MVIKotlin 3.0.0-beta02 is released! - Added exper...
# mvikotlin
a
MVIKotlin 3.0.0-beta02 is released! • Added experimental
Store
DSL (#30) • Removed
ExperimentalCoroutinesApi
annotations, because the used coroutines API is no longer experimental (#28) • Refactored all samples (#29) • Updated docs (#31, #32)
👀 1
🐕 1
🎉 5
K 2
Here is one of the possible ways:
a
The DSL looks like a nice improvement for making stores!
🎉 1
@Arkadii Ivanov One question about the DSL now that I'm looking at it, is it possible to have intents be an exhaustive when statement instead of hooking into each individual intent subclass? I personally prefer using the when statement because the ide has that shortcut for adding remaining branches which makes it very easy to ensure an intent wasn't missed.
Copy code
}
a
You can write:
Copy code
onIntent<Intent> { intent ->
    when (intent) {
        //...
    }.let {}
}
Does it work for you?
a
Perfect, that was exactly what I was thinking!
🎉 2
👍 1