Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vuex] do not mutate vuex store state outside mutation handlers #1

Open
avimehenwal opened this issue Apr 2, 2020 · 1 comment
Open
Labels
bug Something isn't working

Comments

@avimehenwal
Copy link
Owner

avimehenwal commented Apr 2, 2020

client.js?06a0:84 Error: [vuex] do not mutate vuex store state outside mutation handlers.
    at assert (vuex.esm.js?2f62:90)
    at Vue.store._vm.$watch.deep (vuex.esm.js?2f62:793)
    at Watcher.run (vue.runtime.esm.js?2b0e:4568)
    at Watcher.update (vue.runtime.esm.js?2b0e:4542)
    at Dep.notify (vue.runtime.esm.js?2b0e:730)
    at Object.reactiveSetter [as country] (vue.runtime.esm.js?2b0e:1055)
    at getCountryCount (index.js?9101:65)
    at wrappedGetter (vuex.esm.js?2f62:781)
    at Vue.eval (vuex.esm.js?2f62:95)
    at Watcher.get (vue.runtime.esm.js?2b0e:4479)
async asyncData ({ store }) {
  // async asyncData ({ $axios, store }) {
    // let response = await $axios.$get('https://api.covid19api.com/summary')
    // this.updateStore(response.Countries)
    await store.dispatch('get')
    // return { country: response.Countries }
    // store.dispatch('fetch_COUNTRY')
  }
@avimehenwal avimehenwal added the bug Something isn't working label Apr 2, 2020
@shubhranshu
Copy link
Collaborator

shubhranshu commented Apr 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants