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

101
Vistas
Deleting data in firebase 7

Recently I came across a problem, I am making a function where you can get rid of chats in my app so I have this function

function deleteconvo() {
        const me = firebase?.auth?.currentUser?.uid;
        const members = [me, recipient.uid];
        firebase.db.collection("conversations").remove({ members }); 
    }

Firebase is telling me that:

firebase.db.collection("conversations").remove({ members }); is not a function

I also tried .delete and I cant find any answers online. Anyone have a solution to this?

note: I understand that I have to grab the docs value too, because I am in the conversation collection of the the database each conversation has its own unique ID, which I dont know how to grab and store that in a variable.

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

0

A good starting point is the official Firestore documentation regarding how to delete data.

In that page you can find examples in different languages on how to delete documents, fields and collections.

For example to delete an entire collection or subcollection in Cloud Firestore you need to retrieve all the documents within the collection or subcollection and delete them.

And to delete a document you can use the delete() method:

const res = await db.collection('cities').doc('DC').delete();

`

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