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

72
Views
Captadores de mapas de Vue 3

Tengo un pequeño problema con Vue 3. El problema es que, la primera vez que visito la página, todo se ve bien, pero la segunda vez, cuando se vuelve a cargar el getter, prerenderizará la página. Básicamente, puedo ver la primera carga, eliminar la primera carga y cambiar por una nueva, pero como sé, solo debería actualizar la matriz y no renderizar previamente la tabla anterior.

Así que esto es lo que arruiné:

Así es como se ve el archivo de mi tienda:

 export const forum = { state: { forum: [] }, actions: { async GET_FORUMS(commit: any, payload: any ) { API.get('/forum') .then((response: any) => { commit.commit('forum', response.data.data) }).catch((e) => ( notif.error(e.message) ) ) } }, mutations: { async forum(state: any, forum:any) { state.forum = forum }, }, getters: { forums(state:any) { return state.forum; }, } }

Y aquí está el método de instalación en el archivo vue.

 const store = useStore(); const isLoading = ref(true) const forums = computed(() => { return store.getters.forums }) onBeforeMount(async () => { if (isLoading.value) { await store.dispatch('GET_FORUMS') isLoading.value = false } });

¿Qué he estropeado aquí?

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!