[Vuejs]-How to get vuex pagination to be reactive?

0πŸ‘

βœ…

In your fetchData method you are calling the async action getProjects, but you are not waiting until the returned promise is resolved.

Try to use async and await in your fetchData method.

  methods: {
    async fetchData(page) {
      await this.$store.dispatch("getProjects", page);
      this.projects = this.$store.getters.projects;
    },
  },

Leave a comment