Package-level declarations

Types

Link copied to clipboard
interface MutableState<T> : State<T>

A State whose value can be updated.

Link copied to clipboard
object Snapshot

Central orchestrator for the reactive state system.

Link copied to clipboard
class SnapshotStateList<T> : MutableList<T>

An implementation of MutableList that integrates with the Snapshot system.

Link copied to clipboard
class SnapshotStateMap<K, V> : MutableMap<K, V>

An implementation of MutableMap that integrates with the Snapshot system.

Link copied to clipboard
interface State<out T>

Represents a value that can be observed by the framework.

Functions

Link copied to clipboard
fun <T> derivedStateOf(calculation: () -> T): State<T>

Creates a State whose value is calculated from other state objects.

Link copied to clipboard
operator fun <T> State<T>.getValue(thisRef: Any?, property: KProperty<*>): T

Delegate for reading State values using the by keyword.

Link copied to clipboard
fun <T> mutableStateListOf(vararg items: T): SnapshotStateList<T>

Creates a thread-safe observable list initialized with items.

Link copied to clipboard
fun <K, V> mutableStateMapOf(vararg pairs: Pair<K, V>): SnapshotStateMap<K, V>

Creates a thread-safe observable map initialized with pairs.

Link copied to clipboard
fun <T> mutableStateOf(initial: T): MutableState<T>

Creates a new MutableState initialized with initial.

Link copied to clipboard
operator fun <T> MutableState<T>.setValue(thisRef: Any?, property: KProperty<*>, value: T)

Delegate for updating MutableState values using the by keyword.