Firebase - Firestore - how many times will I read documents

With the new Firestore from Firebase, I found that I have poor knowledge with Observables.

My problem is this:

I get some data with db.collection ('room').

  • If I do not listen to the observed with the subscription, I take the document? (I think so).

  • For every change in my room, the “room”, is it considered a “new document read” by Firestore?

  • If I have duplicated Observables that return db.collection ('room') in my application, will I have X calls in the Firestore database or only one?

Thank!

+4
source share
1 answer
  • If I do not listen to the observed subscription, do I take a document? (I think so).

var ref = db.collection('room'), ref , 'room'. ( ).

ref.get() ref.onSnapshot() .

  1. "", " , " Firestore?

( where() .orderBy()), onSnapshot(), , , .

  1. Observables, db.collection('room') , X- Firestore ?

Cloud Firestore , . / .

+6

Source: https://habr.com/ru/post/1687510/


All Articles