Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Vuex method mapGetters can't fetch values

I have one modal for create user. There I need to call API and I am calling it through vuex store method i.e mapGetters. However it's not working. Can anyone tell me whats missing here?

create-user file.

import {mapGetters} from "vuex"

computed: {
    ...mapGetters("Entities", ["getEntities"]),
}

entities file:

const state = () => ({
  entities: []
})
const getters = {
  getEntities: (state) => state.entities
}
const mutations = {
  setEntities(state, entities) {
    state.entities = [...entities]
  }
}

const actions = {
  async fetchEntities({commit}) {
    return await axios.get('/entity')
      .then((resp) => {
         return resp
      })
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!