Name and ID attribute for vue form

Hi, I have a vue form that sends json file to my backend. Do I need to use id and name tag on inputs if I use v-model directive? It looks completely unnecessary to me, but maybe there is some good reason that I am not aware of.
1 Reply
__araceli
__araceli17mo ago
Hi, I am also learning Vue. Now that you say it, one advantage I can think of is that if it the input has an id you can link it to its <label> using the for="inputId". That way when you click the label the input gets focus
Want results from more Discord servers?
Add your server