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

231
Vistas
Firebase updateDoc function not working [Web v9 (modular)]

from what I understand I'm doing the exact replica of Firestore's sample but I get the error:

'Argument type {isDismissed: boolean} is not assignable to parameter type UpdateData<{isDismissed: boolean}> '

when I use updateDoc in example below, it doesn't update the database when run. I'm using web version 9.

const dismissPatientAlert = (alertId) => {
    alert(alertId)
    const docRef = doc(db, 'Alerts', alertId);
    updateDoc(docRef, {isDismissed: true})
    return 'dismissed alert';
};

my samples source: https://firebase.google.com/docs/firestore/manage-data/add-data#update-data Any insight will be appreciated, thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

did you try to use setDoc instead ?

    const dismissPatientAlert = (alertId) => {
    alert(alertId)
    const docRef = doc(db, 'Alerts', alertId);
    setDoc(docRef, {isDismissed: true},{merge:true})
    return 'dismissed alert';
};
about 4 years ago · Juan Pablo Isaza Denunciar
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