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

116
Vistas
is there a way to count how many firestore onSnapshot are active in my app?

I'm building some logic in my app that dynamically discards query onSnapshot listeners and creates new ones. I want to test that resources are been set free by the correct use of the unsubscribe function.

I don't have access to the unsubscribe reference to spy on it. I was wondering if there is a way to know how many active onSnapshot listeners are active, so I could expect the correct count on them.

I'm using the version 9 of the firebase web javascript sdk.

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

0

There's nothing built into the Firebase SDKs for counting the active Firestore listeners. If you need something like that, you'll have to build it yourself by increasing a counter when you attach a listener, and decreasing it when you remove a listener.

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