saveState

inline fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.saveState(saver: Saver<S>, context: CoroutineContext = EmptyCoroutineContext, behaviors: Set<SaveBehavior> = SaveBehavior.Default, name: String? = PluginNameSuffix, resetOnException: Boolean = true)

Creates and installs a new saveStatePlugin. Please see the parent overload for more info.

  • By default, the plugin will use the name derived from the store's name, or the state S class name.

See also