I've passed down state object as a prop and while I can change arrays to pass down to mutator to overwrite whole object on property change, I can't do so on property literals.
The documentation warns that I should be able to change arrays/objects, yet I can't modify object.prop = "string". I also don't understand why it is that I can actually change arrays of state object that is meant to be immutable. There're workarounds to changing props that are literals, but than they're out of sync with original prop. I'd be happy to see another efficient solution to making forms for changing state object properties.
<div id="skillListing" class="ui item" @change="resetSkill">
<input :value="filter.name" placeholder="edit me">
props: [
"filter",
"fIndex",
"gIndex"
],
methods: {
resetSkill () {
console.log(this.filter.name) //won't change
this.$store.commit('upsert_skill', {o: this.filter, f: this.fIndex, g: this.gIndex})
}
}