rxfire
rxfire copied to clipboard
[exp] Firestore rxfire function names match Firebase SDK names
In v9 of the Firebase SDK, firebase/firestore exports doc and collection as functions. It may be confusing for developers to have to always remember to be careful with their imports. For example, they'd have to do:
import { doc } from "firebase/firestore";
import { doc as doc$ } from "rxfire/firestore";
const colorDoc = doc(firestoreInstance, "colors", "blue");
doc$.subscribe(colorDoc, () => {
/* ... */
});
Maybe we should change the names of rxfire's doc and collection? Maybe docSnapshots and querySnapshots?
I like the doc$ function alias or a getDoc$ function alias. Let's start with updating the current firestore examples to eliminate the name errors.
They probably may be named like angular/fire does: link
-
doc->docSnapshots -
collection->collectionSnapshots
