parentStorePlugin
An overload of the parentStorePlugin that also consumes its MVIActions. Please see the other overload for more documentation.
See also
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.whileSubscribedPlugin
import pro.respawn.flowmvi.dsl.collect
whileSubscribedPlugin { parent.collect { } }
Creates and installs a new plugin that will subscribe to the parent store at the same time the current store is subscribed to and when minExternalSubscriptions are reached.
This plugin will subscribe to the parent store and render its states while there are minExternalSubscriptions of the current store present. When the subscribers leave as in whileSubscribedPlugin, this store will also unsubscribe from the parent store.
Essentially, this store will be a subscriber of another store while this store is also subscribed to externally. For the behavior where the store will always be subscribed, please subscribe in the initPlugin.
This function will not consume MVIActions of the parent store. For that, please see the other overload of this function.
The name of this plugin will be derived from the parent store's name, if present, otherwise null
.