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 > lite > snapshotEqual

snapshotEqual() function

Returns true if the provided snapshots are equal.

Signature:

export declare function snapshotEqual<T>(left: DocumentSnapshot<T> | QuerySnapshot<T>, right: DocumentSnapshot<T> | QuerySnapshot<T>): boolean;

Parameters

Parameter Type Description
left DocumentSnapshot<T> | QuerySnapshot<T> A snapshot to compare.
right DocumentSnapshot<T> | QuerySnapshot<T> A snapshot to compare.

Returns:

boolean

true if the snapshots are equal.