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:
A newly initialized Firestore
instance.