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