StateReceiver
An entity that handles MVIState updates. This entity modifies the state of the StateProvider. This is most often implemented by a Store and exposed through PipelineContext.
Implements ImmediateStateReceiver
Inheritors
Properties
Functions
Link copied to clipboard
Directly compare and set the current state.
Link copied to clipboard
Obtain the current StateProvider.state and update it with the result of transform.
Link copied to clipboard
inline suspend fun <T : S, S : MVIState> StateReceiver<S>.updateState(crossinline transform: suspend T.() -> S)
A typed overload of StateReceiver.updateState.
Link copied to clipboard
inline fun <T : S, S : MVIState> ImmediateStateReceiver<S>.updateStateImmediate(transform: T.() -> S)
A typed overload of updateStateImmediate.
A function that obtains current state and updates it atomically (in the thread context), and non-atomically in the coroutine context, which means it can cause races when you want to update states in parallel.