I have a long backgrond in VueJS, I decided to try out coconut (smaller, faster, typesafe)
on all online docs I see buttons mutating the state and state being visualized on dumb elements.
I am used to vuew js to the pattern of <input v-model="my_number" />
where Vue will replace it with reactivity to :value="my_number.toString()" @change="my_number=parseInt(this.value)"
, vue has also some special rules on sringifying and parsing, to help with booleans, nulls, checkboxes etc.
Is this supported by coconut?
<input type="number" value=${balance}></input>
Currently the markup above, complains about balance being an Int, I could fix this by changing it to Std.string(balance) but than update will not work?
From the coconut mvc he is doing it like this <input ref=${input} type="text" placeholder="What needs to be done?" onkeypress={e -> if (e.which == KeyboardEvent.DOM_VK_RETURN && e.src.value != "") { todos.add(e.src.value); e.src.value = ""; }} />
Which is really long