Answer the question
In order to leave comments, you need to log in
When to use ref and when to use v-model?
<input v-model="email"/>
//or
<input ref="email"/>
Answer the question
In order to leave comments, you need to log in
ref - when you need to access the element from the code
v-model - when you need to associate data with the content of the element
These 2 concepts are NOT similar in any way
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question