由于我观察到出乎意料的大量读取,我尝试使用 the docu 来计算有多少读取绑定同一文档多次触发。
假设我有一个动作:
export const setTodosRef = firestoreaction(
({ bindFirestoreRef,unbindFirestoreRef },documentId) => {
bindFirestoreRef('documents',db.collection('documents').doc('sameid'))
}
)
如果我使用相同的文档 ID 'sameid' 调用 setTodosRef
3 次会发生什么?是 3 还是 1?
vuexfire 是否足够聪明知道同一个文档已经被绑定?