Closed jigsawsoul closed 7 years ago
It seems as through because the data for the store is being loaded by ajax that the component is mounted before the data is returned, therefore returning no data within this.$store.list
Although is this data not reactive, when the data is finally assigned into the store would the component then not see the data?
I have resolved this issue by watching the store.
watch: {
'$store.jobs'() {
this.list = this.$store.jobs
}
},
Please let me know if this seem the correct approch
Sorry about the delayed reply. This seems like a fine solution. vue-stash
doesn't have a built in way to handle this, so using a watcher seems fine. You vue-stash
store is after all just a plain javascript object on your root component. Glad you figured this out!
I have a store within my main vue instance which is working fine and has data. I am trying to access that data within a component...
But list is not populated, although I can see within vue dev tools that the list within the store on the root is populated.
Am I missing something?