DEV Community

Discussion on: How do you build Forms?

Collapse
 
cwraytech profile image
Christopher Wray

In Vue, I like building my forms myself. I really like knowing what’s going on and it is pretty easy with Vue v-model to keep track of data in the form and send that in an API request.

Collapse
 
madza profile image
Madza • Edited

Never tried Vue to the point forms would be needed, tho I liked the simplicity and syntax πŸ˜‰Reminds me a bit of Svelte, which I love working with now πŸ˜‰

Collapse
 
cwraytech profile image
Christopher Wray

After working more with react lately I love Vue even more… I really like the separation of concerns with HTML being in the template and JavaScript being in the script tag. It’s much easier to go exactly to where you need.

Thread Thread
 
madza profile image
Madza

Great to hear you found something that work for you πŸ˜‰
Stick with it, as I believe that passion towards some particular tech improves productivity tremendously πŸ˜‰

Thread Thread
 
cwraytech profile image
Christopher Wray

Thank you! I’ve felt bad about it honestly because I do want to be willing and able to work with anything. But it is encouraging hearing your input.

Thread Thread
 
madza profile image
Madza • Edited

Nowadays, when hundreds of new tech are coming out day by day, it's impossible to learn everything, not to mention master everything. My approach to this is, I always try to check the hottest trends like monthly, but only to the point, where I understand their main working principles and use cases. Later, when the appropriate project comes, I know my advantages with the particular tech, and picking up the syntax is just a matter of time. πŸ˜‰

Thread Thread
 
cwraytech profile image
Christopher Wray

Love it! I think I’ll be trying to use that approach from now on.

Thread Thread
 
madza profile image
Madza

Hope that helps πŸ˜‰ I believe the famous saying 'Work smart, not hard', could be well transferred to learning, as well. And the more information there is, the more crucial it becomes πŸ˜‰

Collapse
 
nezam05 profile image
Nezam uddin

Please share how you create form in svelte. I was using reactive form in Angular

Collapse
 
kalashin1 profile image
Kinanee Samson

using sloths make building forms with vue fun!

Collapse
 
ninest profile image
ninest

What is your method of dealing with form errors such as "Invalid username", or "Password too short"? For small forms it's easy to display the error underneath the input, but doesn't this get difficult to manage as the form gets larger and more complex? For this reason I decided to experiment with VeeValidate

Collapse
 
cwraytech profile image
Christopher Wray

Yeah, in those cases it is nice to use a package like that.. I would still build the form fields and data attributes myself, but use vue validate on the fields for validations.