unyt-org / uix

The UIX Framework
https://uix.unyt.org
MIT License
67 stars 3 forks source link

Support textarea reactive value #166

Closed jonasstrehle closed 1 month ago

jonasstrehle commented 4 months ago

see https://discord.com/channels/928247036770390016/1261380437482410035

jonasstrehle commented 1 month ago

UIX is supporting both notations:

const ref = $(0)
<textarea value={ref}/>

and

const ref = $(0)
<textarea>{ref}</textarea>

The first is necessary for handling unidirectional data binding (value:out and value:in), the latter is the "How it should be used in 99% of the cases"-solution - similar as it would be achieved in HTML. Note that the value attribute for textarea is against HTML Spec, this is why for bidirectional binding the second example should be the recommended way in docs. @unyt-org/admin @benStre @asbng

benStre commented 1 month ago

nice!