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

184
Vistas
List of users of chat room in firestore how to do that?

My webapp will have chat rooms, i need to implement list of users in that chat rooms.

  1. What is the best way to do that? By subcollection or array?

If array: How to update just one field in document? ( How to add user.uid to array )

If subcollection: How to get acces to subcolection in v9 firestore?

Code for creating room:

await addDoc(collection(db, "rooms"), {
            creator_uid: uid,
            name: _name,
            secured: is_secured,
            password: pass,
            room_members: [],
        });
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Based on the official documentation the best practice would be using subcollections will work better if you have simple, fixed lists of data that you want to keep within your documents, this is easy to set up and streamlines your data structure. Here is a great google documentation that could help you with the subcollection.

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