parentStore

inline fun <S : MVIState, I : MVIIntent, A : MVIAction, S2 : MVIState, I2 : MVIIntent> StoreBuilder<S, I, A>.parentStore(parent: Store<S2, I2, *>, name: String? = parent.name?.let { "ParentStorePlugin\$$it" }, minExternalSubscriptions: Int = 1, crossinline render: suspend PipelineContext<S, I, A>.(state: S2) -> Unit)

Deprecated

Parent store plugin introduces unnecessary complexity to the behavior and has little flexibility. Subscribe to the store in some other plugin instead, such as whileSubscribedPlugin using a suspending function collect()

Replace with

import pro.respawn.flowmvi.plugins.whileSubscribed
import pro.respawn.flowmvi.dsl.collect
whileSubscribed { parent.collect { } }

Install a new parentStorePlugin. This overload does not collect the parent store's actions.

See also


inline fun <S : MVIState, I : MVIIntent, A : MVIAction, S2 : MVIState, I2 : MVIIntent, A2 : MVIAction> StoreBuilder<S, I, A>.parentStore(parent: Store<S2, I2, A2>, name: String? = parent.name?.let { "ParentStorePlugin\$$it" }, minExternalSubscriptions: Int = 1, crossinline consume: suspend PipelineContext<S, I, A>.(action: A2) -> Unit, crossinline render: suspend PipelineContext<S, I, A>.(state: S2) -> Unit)

Deprecated

Parent store plugin introduces unnecessary complexity to the behavior and has little flexibility. Subscribe to the store in some other plugin instead, such as whileSubscribedPlugin using a suspending function collect()

Replace with

import pro.respawn.flowmvi.plugins.whileSubscribed
import pro.respawn.flowmvi.dsl.collect
whileSubscribed { parent.collect { } }

Install a new parentStorePlugin.

See also