StoreFlow

interface StoreFlow<State> : Flow<State>

Represents a redux store backed by a kotlinx.coroutines.flow.StateFlow

Functions

Link copied to clipboard
abstract suspend fun collect(collector: FlowCollector<State>)
Link copied to clipboard
abstract fun dispatch(action: Action)

Properties

Link copied to clipboard
abstract val initialState: State
Link copied to clipboard
abstract val state: State

Extensions

Link copied to clipboard
fun <T, R> StoreFlow<T>.mapStore(mapper: (T) -> R): StoreFlow<R>

Maps a StoreFlow that emits a state of type T to one that emits a state of type R, by applying the given mapper to its emissions.