interface DataFlow
Unidirectional Data Flow
A component that is able to declare new action, and dispatch to an internal reducer processor
ActionDispatcher - Have at least one DataPublisher, to publish State/Event data
onError - default error handling behavior that can be overloaded
Author
Arnaud Giuliani
abstract val actionDispatcher: ActionDispatcher |
|
abstract val coroutineScope: CoroutineScope |
|
abstract val tag: String |
open fun action(onAction: ActionFunction): Actionopen fun action(onAction: ActionFunction, onError: ActionErrorFunction): Action |
|
abstract fun defaultPublisher(): DataPublisher |
|
open suspend fun onError(error: Exception, currentState: UIState): Unit |
fun <T : UIState> DataFlow.actionOn(onAction: ActionFunction_T<T>): Actionfun <T : UIState> DataFlow.actionOn(onAction: ActionFunction_T<T>, onError: ActionErrorFunction_T<T>): Action |