4 ms·
Everything? Here is what the recommended use of two-way binding does in VueJS: "You can use the v-model directive to create two-way data bindings on form inpu
by kylestlb 9y ago
Everything? Here is what the recommended use of two-way binding does in VueJS:
"You can use the v-model directive to create two-way data bindings on form input and textarea elements. It automatically picks the correct way to update the element based on the input type. Although a bit magical, v-model is essentially syntax sugar for updating data on user input events, plus special care for some edge cases."
Seems like a very specific, deliberate functionality. Changing a value of a reference from a parent component, however, is advised against and is probably what you're referring to.
- cjalmeida 9y agoIMO, that's the beauty of Vue data binding. It will work as you'd expect for the majority of cases (ie. simple form binding) without the boilerplate and shooting you in the foot.