Google is committed to advancing racial equity for Black communities. See how.

MutableState

@Stable interface MutableState<T> : State<T>
androidx.compose.runtime.MutableState

A mutable value holder where reads to the value property during the execution of a Composable function, the current RecomposeScope will be subscribed to changes of that value. When the value property is written to and changed, a recomposition of any subscribed RecomposeScopes will be scheduled. If value is written to with the same value, no recompositions will be scheduled.

Summary

Public methods
abstract operator T

abstract operator (T) -> Unit

Extension functions
From androidx.compose.runtime
operator Unit
MutableState<T>.setValue(thisObj: Any?, property: KProperty<*>, value: T)

Permits property delegation of vars using by for MutableState.

Inherited extension functions
From androidx.compose.runtime
operator T
State<T>.getValue(thisObj: Any?, property: KProperty<*>)

Permits property delegation of vals using by for State.

Properties
abstract T

Public methods

component1

abstract operator fun component1(): T

component2

abstract operator fun component2(): (T) -> Unit

Properties

value

abstract var value: T