Re:Svelte 5: Runes
by satvikpendem on Wednesday September 20, 2023 @10:56AM
(#37585003)
Sorry, I should have been more clear, I was talking more about Vue and Svelte rather than Solid, which explicitly says they don't have 2-way binding due to learning about how dangerous it is and how React doesn't have it: https://www.solidjs.com/guides/faq#why-can-i-not-just-assign...
[ Parent
| on HN ]
These discussions are so tiring.
React has as much two way binding as vue - in vue v-model is just syntactic sugar for setting up event listeners and setting the value on an input element.
Per the docs [0]
<input v-model="searchText" />
Becomes
<input :value="searchText" @input="searchText = $event.target.value" />
It's such a small thing that it's crazy it's being discussed this much.