-
I want to set up Firestore emulator, using the Docs Common use cases show using Should I use one, either one, or both? Issue about syntax highlighting moved here Firebase 0.900.15 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
For the emulator functions, this was a conscious decision to have free-floating functions to configure the emulator (so that these don't impact the bundle size when you're not using the emulator). So you'd use ( For example: import { getFirestore, useFirestoreEmulator } from 'firebase/firestore';
const firestore = getFirestore(app);
useFirestoreEmulator(firestore, 'localhost', 8080); (The difference between As for IDE highlighting issue, I'm not sure about that |
Beta Was this translation helpful? Give feedback.
For the emulator functions, this was a conscious decision to have free-floating functions to configure the emulator (so that these don't impact the bundle size when you're not using the emulator). So you'd use (
initializeFirestore
ORgetFirestore
) ANDuseFirestoreEmulator
. As with the old version, make sure the emulator function is called before the library is used.For example:
(The difference between
initializeFeature
andgetFeature
is that the former allows for more custom configuration of dependencies, whereas the latter pull…