https://kotlinlang.org logo
#orbit-mvi
Title
# orbit-mvi
r

Ravi

03/28/2021, 10:47 PM
@Mikolaj Leszczynski can we change the public val stateFlow: Flow<STATE> in Container to public val stateFlow: StateFlow<STATE>. Also while initialzing container in viewmodel we will be setting up initial state. In jetpack compose while consuming this I've to set that initial value again. Please let me know your thoughts on this, I can add the same on github discussion
Copy code
@Composable
fun SomeCompose(viewModel: SomeViewModel){
    val someState = viewModel.container.stateFlow.collectAsState(initial = initialState)
}
we can get initial state from (Mutable)StateFlow and collectAsState()
m

Mikolaj Leszczynski

03/29/2021, 6:12 AM
Hey — thanks for the excellent feedback! I think we had this change planned but it somehow fell off of our roadmap. Could you please create an issue on our github repo and we’ll look into it?
👍 2
2 Views