Is the method onSnapshot of firestore triggered by any changes in subcollections?
What is the difference between db.firestore.collection('x'). onSnapshot
And db.firestore.collection('x').doc('y').collection('z'). onSnapshot
Are they equal????
Is the method onSnapshot of firestore triggered by any changes in subcollections?
What is the difference between db.firestore.collection('x'). onSnapshot
And db.firestore.collection('x').doc('y').collection('z'). onSnapshot
Are they equal????
A change to a subcollection organized under a document do not count as changes to the document itself. They will not trigger a snapshot event on that document.
Listening to a subcollection is not any different than listening to a top-level collection. In both cases, the listener will only be triggered by changes to documents within that collection or subcollection.