Home > @firebase/firestore > / > useFirestoreEmulator
useFirestoreEmulator() function
Modify this instance to communicate with the Cloud Firestore emulator.
Note: This must be called before this instance has been used to do any operations.
Signature:
export declare function useFirestoreEmulator(firestore: FirebaseFirestore, host: string, port: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
firestore | FirebaseFirestore | The Firestore instance to configure to connect to the emulator. |
host | string | the emulator host (ex: localhost). |
port | number | the emulator port (ex: 9000). |
Returns:
void