I have large forms for submitting on one page.
<container>
<formA>
<formB>
<formC>
<submitButton>
<container>
it looks like this. and I have a store that stores data of each form. then when the user clicks the submit button, I collect all the form data using the vuex repository.
The problem is that I need to update the form data every time.
so i will be like in vue component
watch: {
userInput (val) {
this.updateState(val)
}
Update status when an input changes by viewing form data (tied to a v-model).
or the like, which is documented in a vuex document.
userInput: {
get () {
return this.$store.state.userInput
},
set (val) {
this.updateState(val)
}
}
well .. I don't think this is a good idea. Is there a better way to generate processing with vuex?
source
share