What is the difference between v-model and .sync when used on a custom component
For Vue.js 2 both pretty much do the same thing – enable two-way binding, although .sync is more versatile. It was added after v-model was added for components. .sync allows to use v-model logic for more than one prop. Let’s compare: .sync <comp :value.sync=”username” :age.sync=”userAge” /> expands to: <comp :value=”username” :age=”userAge” @update:name=”val => userName = … Read more