Home

Issue: 2750

Namespaced modules in vuex doesnt match the mutation name

[issue link]

I have an action here that lets the user join and set the loading state of the module to its value and key

so the problem is instead of the usual mutationon trybe/SET_LOADING

the commit doesn’t match its mutation name.

async join({ commit }, { id }) {
    const client = this.app.apolloProvider.defaultClient;
    commit("SET_LOADING", { key: "joinOrLeave", value: true });
    let { data: res } = await client.mutate({
      mutation: TrybeAddUser,
      variables: {
        id
      }
    });
    commit("SET_LOADING", { key: "joinOrLeave", value: false });
    return res.result;
  },

but instead it mutates with “SET_LOADING” only so i tried to set it to “trybe/SET_LOADING” but i get this

image

image

This question is available on Nuxt.js community (#c2386)