Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exp] Firestore rxfire function names match Firebase SDK names #21

Open
jhuleatt opened this issue Jul 13, 2021 · 2 comments
Open

[exp] Firestore rxfire function names match Firebase SDK names #21

jhuleatt opened this issue Jul 13, 2021 · 2 comments
Assignees

Comments

@jhuleatt
Copy link
Contributor

jhuleatt commented Jul 13, 2021

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?

@voscausa
Copy link

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.

@daguttt
Copy link

daguttt commented Apr 1, 2023

They probably may be named like angular/fire does: link

  • doc -> docSnapshots
  • collection -> collectionSnapshots

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants