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

230
Views
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 answers
Answer question

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 Report
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!