I
I
insanel2020-08-11 17:11:47
Vue.js
insanel, 2020-08-11 17:11:47

What is the best way to break up a large registration form in vue?

And so, I have a huge form for submitting data

While I was making up and not noticing the essence, I realized that my component had grown to 200 characters and would increase by the same amount if we continue in the same spirit.

I assume that it would be possible to logically group some inputs from each other, but in this case, how to transfer data? + almost every input is validated by vuelidate, I also don’t quite understand how to do it

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
segio_tt, 2020-08-11
@insanel

The storage here can be confusing, it’s better to make a parent component, write the data fields there and import the child components (you can put all the inputs into separate ones, but this can also confuse you, and send from the child components via emit when changing the fields of the input or skeleton, this is already an option can be inside watch.

B
bqio, 2020-08-11
@bqio

Well, firstly, what kind of form do you have there?
And secondly, in the parent component, listen to events from the child, and in the child emitte to the parent, but I would look towards Vuex.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question