MutableState

Caller-owned observable value whose reads and writes require its construction execution owner. This is the physical construction thread unless a runtime explicitly creates it in a serial ownership scope. Equal assignments do not invalidate observers; changed assignments invalidate every observing screen. Screen evaluation and guarded equality reject mutation before changing the value. A throwing equality comparison preserves the previous value and propagates the original failure. Create this value outside screen evaluation so rebuilding a screen does not reset it.

Parameters

initialValue

value retained until a successful unequal assignment.

Properties

Link copied to clipboard
open override var value: T

Returns the current owner-thread value, recording an active screen dependency.