struct State
Swift
@propertyWrapper struct State<Value>
A source of truth owned by a view, surviving that view being rebuilt.
Sources/LavaUI/State.swift:46
Constructors
init(wrappedValue: Value)
Creates the state with its initial value. Used only the first time the view mounts; after that the stored value wins.
Sources/LavaUI/State.swift:51
Properties
var projectedValue: Binding<Value> { get }
$value — a read/write reference for child views.
Sources/LavaUI/State.swift:62
var wrappedValue: Value { get nonmutating set }
The current value. Setting it invalidates the bodies that read it.
Sources/LavaUI/State.swift:56