Closed kissmygritts closed 7 years ago
https://vuex.vuejs.org/en/forms.html recommends using two way computed property between the component and vuex.
computed: { message: { get () { return this.$store.state.obj.message }, set (value) { this.$store.commit('updateMessage', value) } }
However this will require writing one for each field. This doesn't sound appealing.
Not to mention, how can I do this with an dynamic form elements and arrays?
https://ypereirareis.github.io/blog/2017/04/25/vuejs-two-way-data-binding-state-management-vuex-strict-mode/
This article has an interesting implementation.
https://vuex.vuejs.org/en/forms.html recommends using two way computed property between the component and vuex.
However this will require writing one for each field. This doesn't sound appealing.
Not to mention, how can I do this with an dynamic form elements and arrays?