Hello! I've got an app based around MVIKotlin with...
# mvikotlin
t
Hello! I've got an app based around MVIKotlin with Android `View`s and UIKit `UIView`s on iOS. I'm starting to migrate to Compose on Android and trying to figure out how to map the existing MVIKotlin pieces to my
Composable
. It seems like my
BaseMviView
-derived view implementation doesn't quite fit Compose with its explicit
render()
function. How should I map user input to my component? And should I just have my component expose its
store.states: Flow<State>
so I can use it as the top-level state for my
Composable
? Thanks!
my plan is to migrate to Decompose and I've been looking at the samples but that's a step beyond where I am right now and I'm having a little trouble interpolating
a
Hello! BaseMviView may also be used. You can add
private var model by mutableStateOf(YourModel())
, and let the
render
method just update the
model
property. Then you need to add
@Composable fun Content() { ... }
, where you render
YourModel
. Another option is to not use
MviView
and expose
State<YourModel>
from the component/controller.
t
thanks! I'll try that out