Experimental

An early preview: docs, the API and the dashboard may change or break.

Report a problem

ui.Value

State live UI reads. Setting it redraws what read it, unless it's an equal number, string or boolean; tables always redraw, so a table can be changed in place and set again.

Methods

value:get() -> T
#

the current value

value:set(value: T)
#

replaces the value

value:update(change: (old: T) -> T)
#

sets the value to what change returns for the current one