history

fun <T> history(capacity: Int = 0, initialValue: List<T> = emptyList()): History<T>

factory-method to create a History

Parameters

capacity

max number of entries in history

initialValue

initial content of the history


fun <D> Store<D>.history(capacity: Int = 0, initialEntries: List<D> = emptyList(), synced: Boolean = true): History<D>

factory-method to create a History synced with the given Store, so that each update is automatically stored in history.

Receiver

Store to sync with

Parameters

synced

if true, the the history will sync with store updates

capacity

max number of entries in history

initialEntries

initial entries in history