Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
Vu3: forceUpdate() not working when used with async function

I have some code that deletes some data from firestore and then should reload the page. It successfully operate on the database but fails to reload the page.

Here is my function eliminaCategoria():

export async function eliminaCategoria(id, indexCategoria) {
    const ristorante = doc(db, "ristoranti", id);
    const docSnap = await getDoc(ristorante);
    let dati = docSnap.data();
    dati.categorie.splice(indexCategoria, 1);
    return await setDoc(ristorante, dati);
}

And here is where the function is called:

methods: {
    eliminaCategoria() {
      eliminaCategoria(this.idRisto, this.IndexArr).then(() => {
        this.$forceUpdate();
      });
    },
  }

Any ideas on how to solve the issue?

Thanks in advance, Lorenzo

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda