Closed
Description
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
My state for a module looks like this:
const state = {
loaded: false,
items: new Map(),
}
I'm having some issues when updating an item in the list through a mutation, that it doesn't propagate through to the Vue component. In the component I have:
computed: {
item() {
return this.$store.state.module.items.get(this.pk)
},
},
Am I using this wrong, or does Vuex not support Map()? If it's not supported, where would be a good place to put a load(pk)
method?
Metadata
Metadata
Assignees
Labels
No labels