Vuexfire:How many reads does bindFirestoreRef trigger?

38 Views Asked by At

Since I observe an unexpectedly high number of reads I tried to figure out using the docu how many reads binding the same document several times triggers.

Suppose I have an action:

export const setTodosRef = firestoreAction(
  ({ bindFirestoreRef, unbindFirestoreRef }, documentId) => {
    bindFirestoreRef('documents', db.collection('documents').doc('sameid'))
  }
)

What happens, if I call setTodosRef 3 times with same document id 'sameid'? Is it 3 or 1?

Is vuexfire smart enough to know that the same document is already bound?

0

There are 0 best solutions below