FlowReduxStoreBuilder

@ExperimentalCoroutinesApi
class FlowReduxStoreBuilder<S : Any, A : Any>

Functions

Link copied to clipboard
inline fun <SubState : S> inState(noinline block: InStateBuilderBlock<SubState, S, A>.() -> Unit)

Define what happens if the store is in a certain state. "In a certain state" condition is true if state is instance of the type specified as generic function parameter.

inline fun <SubState : S> inState(noinline additionalIsInState: (SubState) -> Boolean, noinline block: InStateBuilderBlock<SubState, S, A>.() -> Unit)

This variation allows you to specify is a mix between inferring the condition of the generic function type and additionally can specify and ADDITIONAL condition that also must be true in addition to the check that the type as specified as generic fun parameter is an instance of the current state.

Link copied to clipboard
fun inStateWithCondition(isInState: (S) -> Boolean, block: InStateBuilderBlock<S, S, A>.() -> Unit)

Define what happens if the store is in a certain state.