Problem
Let's say you want to save the input of your form on the state of vuex.
Maybe someone new to vuex would try something like this...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks! This is exactly what I am looking for.
Where do you call the mapFields function. Could you please show an example?
I think if you do something like
...
Then, in your methods you define the 'handleSubmi function as follows:
methods:{
handleSubmit(e){
e.preventDefault();
mapFields(e)
//...
}
I think something like the above would do... what do you think?
I would use it in the computed property, so i could change the state as i input .
My fault, I will edit the post to answer you, sorry for this and thanks for asking.
Thank you! for this amazing super cool solution. I was searching the web for a normal not redundant way to deal with forms when using Vuex and thank god I bumped into this post. This is an amazing and easy solution, thanks.
p.s. there's a syntax error in the example 'const fields = [options.fields[x]]', the outer square brackets should be removed.
Awesome post, congrats gomito 🤘
Congratulation, it’s a great article!
Thanks man!
Lovely... lovely article. Thanks
Thanks for this elegant solution. But what about nested fields in base? It doesn't seem to be working for nested objects
This is awesome. Thank you.
WoW! Awesome! i was looking for some like that!!
can you show us your store?