Skip to main content

set and toggle

Change existing writable state or host bindings.

Quick reference​

SyntaxBehavior
set path to expressionAssign an existing writable path.
toggle pathNegate a writable boolean.

Example​

<Column state="{open:false}"><Button title="Toggle" on-press="toggle open" /></Column>

Rules and validation​

Do not write data, props, event, refs, handler locals, or runtime-owned busy fields. Local state supports existing nested paths; host binding writes use registered writable bindings. Values must satisfy their owner’s contract.

State lesson · state