State And Dispatch
data class StateAndDispatch<S : Any, A : Any>(val state: State<S?>, val dispatchAction: (A) -> Unit)
This class is the return type of FlowReduxStateMachine.stateAndDispatch(). It is mainly meant to be used with Kotlin's deconstructions feature as follows:
val myStateMachine = MyFlowReduxStateMachine()
@Composable
fun MyUi(){
val (state, dispatch) = myStateMachine.rememberStateAndDispatch()
...
}
Content copied to clipboard