The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > QuerySnapshot > docChanges

QuerySnapshot.docChanges() method

Returns an array of the documents changes since the last snapshot. If this is the first snapshot, all documents will be in the list as 'added' changes.

Signature:

docChanges(options?: SnapshotListenOptions): Array<DocumentChange<T>>;

Parameters

Parameter Type Description
options SnapshotListenOptions SnapshotListenOptions that control whether metadata-only changes (i.e. only DocumentSnapshot.metadata changed) should trigger snapshot events.

Returns:

Array<DocumentChange<T>>