Francis Mariano
02/28/2023, 6:32 PMArkadii Ivanov
02/28/2023, 6:34 PMstate.states
.Francis Mariano
02/28/2023, 6:35 PMValue<out T : Any>
anymoreArkadii Ivanov
02/28/2023, 7:02 PMFrancis Mariano
02/28/2023, 8:38 PMinterface ScanComponent {
val states: Flow<ScanStore.State>
}
class ScanComponentImpl {
override val states: StateFlow<ScanStore.State> = store.stateFlow
}
And in the UI a call val uistate by component.states.collectAsState(null)
. Everything works like a charm but the collectAsState need for initial state and the uistate
can be null. The store has an initial state, so it is interesting collectAsState to wait the store emit the first state. Do you have some idea???Arkadii Ivanov
02/28/2023, 8:40 PMFrancis Mariano
02/28/2023, 8:43 PMArkadii Ivanov
02/28/2023, 10:20 PM