StateAndDispatch

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()
...
}

Constructors

Link copied to clipboard
constructor(state: State<S?>, dispatchAction: (A) -> Unit)

Properties

Link copied to clipboard
Link copied to clipboard
val state: State<S?>