val stateFlow by produceState<Flow<Stateable>>(initialValue = flowOf(InitialState), true) {
value = viewModel.reduce(ActivitySearch)
}
val state by stateFlow.collectAsState(initial = InitialState)
in my composable?
is there an approach where i can combine the
produceState
with the
collectAsState
?
z
Zach Klippenstein (he/him) [MOD]
10/04/2022, 10:50 AM
I’m not sure why you have the produceState at all, looks like you could just do: