Package-level declarations

Functions

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction, T : Fragment, StateConsumer<S>, ActionConsumer<A>, Consumer<S, I, A>> T.subscribe(lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): Job

Subscribe to the store lifecycle-aware. Call this in Fragment.onViewCreated

@JvmName(name = "subscribeAndConsume")
fun <S : MVIState, I : MVIIntent, A : MVIAction, T : LifecycleOwner, Consumer<S, I, A>, ActionConsumer<A>> T.subscribe(lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): Job
fun <S : MVIState, I : MVIIntent, A : MVIAction, T : LifecycleOwner, Consumer<S, I, A>> T.subscribe(lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): Job

Subscribe to the store lifecycle-aware.

inline fun <S : MVIState, I : MVIIntent, A : MVIAction> Fragment.subscribe(store: Store<S, I, A>, crossinline render: suspend (state: S) -> Unit, lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): Job

Subscribe to the store lifecycle-aware. Call this in Fragment.onViewCreated.

inline fun <S : MVIState, I : MVIIntent, A : MVIAction> Fragment.subscribe(store: Store<S, I, A>, noinline consume: suspend (action: A) -> Unit, crossinline render: suspend (state: S) -> Unit, lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): Job

Subscribe to the store lifecycle-aware. Call this in Fragment.onViewCreated