I'm just looking for a bit of best practice advise with the Vue v-model naming convention.
I've seen code which just uses a single name like this:
<input name="surname" v-model="surname"/>
export default {
data: function () {
return {
surname: '',
I've also seen it done with dot notation like this:
<input name="surname" v-model="customer.surname"/>
export default {
data: function () {
return {
customer: {
surname: undefined
}
},
Is there a best practice naming convention or is it just a case of whatever you prefer?
I'm just trying to avoid any potential pitfalls while I'm learning rather than stumble across them later.