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

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

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