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 > / > initializeFirestore

initializeFirestore() function

Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other function, including getFirestore(). If the custom settings are empty, this function is equivalent to calling getFirestore().

Signature:

export declare function initializeFirestore(app: FirebaseApp, settings: Settings): FirebaseFirestore;

Parameters

Parameter Type Description
app FirebaseApp The FirebaseApp with which the Firestore instance will be associated.
settings Settings A settings object to configure the Firestore instance.

Returns:

FirebaseFirestore

A newly initialized Firestore instance.