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 > getFirestore

getFirestore() function

Returns the existing instance of Firestore that is associated with the provided FirebaseApp. If no instance exists, initializes a new instance with default settings.

Signature:

export declare function getFirestore(app?: FirebaseApp): FirebaseFirestore;

Parameters

Parameter Type Description
app FirebaseApp The FirebaseApp instance that the returned Firestore instance is associated with.

Returns:

FirebaseFirestore

The Firestore instance of the provided app.