TimeTravel

class TimeTravel<S : MVIState, I : MVIIntent, A : MVIAction>(maxStates: Int = DefaultHistorySize, maxIntents: Int = DefaultHistorySize, maxActions: Int = DefaultHistorySize, maxExceptions: Int = DefaultHistorySize)

A plugin that keeps track of changes in the store. It keeps references to last maxStates (inclusive) states and so on for other properties. Keep a reference to this plugin and use it to enable custom time travel support or validate the store's behavior in tests.

Constructors

Link copied to clipboard
constructor(maxHistorySize: Int = DefaultHistorySize)
constructor(maxStates: Int = DefaultHistorySize, maxIntents: Int = DefaultHistorySize, maxActions: Int = DefaultHistorySize, maxExceptions: Int = DefaultHistorySize)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val actions: List<A>

Actions sent by the store, capped at the value provided at creation time. The last value is the most recent.

Link copied to clipboard

Last exceptions caught by store, capped at the value provided at creation time. The last value is the most recent.

Link copied to clipboard
val intents: List<I>

Intents processed by the store, capped at the value provided at creation time. The last value is the most recent.

Link copied to clipboard
val starts: Int

Number of times the store was launched. Never decreases.

Link copied to clipboard
val states: List<S>

States emitted by the store, capped at max value provided at creation time The last value is the most recent.

Link copied to clipboard
val stops: Int

Number of the times the store was stopped. Never decreases.

Link copied to clipboard

Number of subscription events of the store. Never decreases. The last value is the most recent.

Link copied to clipboard

Number of times the store has been unsubscribed from. Never decreases.

Functions

Link copied to clipboard
fun reset()

Reset all values of this plugin and start from scratch.