View and Binder with compose #58
Replies: 1 comment 2 replies
-
I haven't seen any such examples, but usually there is no need to use
However, there are some use cases. E.g. both interface SomeView : MviView<Model, Event> {
data class Model(val text: String = "")
sealed interface Event {
object OnButtonClick : Event
}
}
class SomeViewImpl : BaseMviView<Model, Event>(), SomeView {
private var model by mutableStateOf(Model())
@Composable
fun Content() {
Button(onClick = { dispatch(Event.OnButtonClick) }) {
Text(model.text)
}
}
override fun render(model: Model) {
super.render(model)
this.model = model
}
} |
Beta Was this translation helpful? Give feedback.
-
I was wondering if there's any sample that applies, if at all possible, MVIKotlin Binders and Views (or equivalent!) to a stack like the one used in the TODO App, i.e. store > component > (compose) content.
Beta Was this translation helpful? Give feedback.
All reactions