OnUnsubscribe

data class OnUnsubscribe(val remainingSubscribers: Int = 0) : SaveBehavior

A saving behavior that saves the state when remainingSubscribers count drops below the specified amount.

  • By default, 0 is used.

  • If you specify multiple remainingSubscribers values, the maximum value will be used.

  • This will not save the state when the parent store stops, so that, usually, if the user left on purpose, the state is not persisted.

See also

Constructors

Link copied to clipboard
constructor(remainingSubscribers: Int = 0)

Properties

Link copied to clipboard