Skip to content

Commit 102be9b

Browse files
committed
chore: comments
1 parent 430ea5c commit 102be9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/firestore/subscribe.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ export function bindCollection<T = unknown>(
354354
},
355355
}
356356

357+
// callback to get all the data at once and know when it's ready
357358
function onSnapshotCallback(snapshot: QuerySnapshot<T>) {
358359
// console.log('pending', metadata.hasPendingWrites)
359360
// docs.forEach(d => console.log('doc', d, '\n', 'data', d.data()))
@@ -389,6 +390,8 @@ export function bindCollection<T = unknown>(
389390
}
390391
}
391392
}
393+
394+
// call each change individually
392395
docChanges.forEach((c) => {
393396
change[c.type](c)
394397
})

0 commit comments

Comments
 (0)