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

Implement ListenSource / SnapshotListenOptions for firestore (new SDK feature March 2024) #8126

Open
mikehardy opened this issue Nov 10, 2024 Discussed in #8124 · 2 comments
Labels
Keep Open avoids the stale bot Needs Attention plugin: firestore Firebase Cloud Firestore Stale type: enhancement Implements a new Feature

Comments

@mikehardy
Copy link
Collaborator

Discussed in #8124

Originally posted by cSieves November 10, 2024
Hi,
I was wondering if there are any plans to allow a user to specify where to get the listener data from. At the moment as far as I understand when setting up a listener data data will be pulled from both the cache and server as changes occur. However, from what I can tell, (correct me if I am wrong) doing it this way creates a number of issues;

  • It drives up costs as every change to a query/doc results in you being charged for a read. This is bad for a few reasons, but if you manage and situation like a social media app where lots of users are updating a single doc e.g. liking a post, the cost grows exponentially.
  • Frequent updates can cause re-renders in react if you are storing the new state in a react hook. This can mess with the user experience

I noticed in the other SDK's there is an option to specify where the data is coming from, is this feature going to become available in the react-native sdk soon too?

In the meantime is there some other way I can achieve the same thing i.e. get realtime updates for changes in my local cache?

@mikehardy mikehardy added plugin: firestore Firebase Cloud Firestore type: enhancement Implements a new Feature labels Nov 10, 2024
Copy link

github-actions bot commented Dec 8, 2024

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 8, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
@mikehardy
Copy link
Collaborator Author

This is a feature in firebase-js-sdk and is needed for parity I believe

@mikehardy mikehardy reopened this Dec 24, 2024
@mikehardy mikehardy added the Keep Open avoids the stale bot label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Keep Open avoids the stale bot Needs Attention plugin: firestore Firebase Cloud Firestore Stale type: enhancement Implements a new Feature
Projects
None yet
Development

No branches or pull requests

1 participant