Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda