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

Add onUpdate Callback to adapterOptions for Real-Time Data Updates #323

Open
AmilKey opened this issue Jul 25, 2024 · 0 comments
Open

Add onUpdate Callback to adapterOptions for Real-Time Data Updates #323

AmilKey opened this issue Jul 25, 2024 · 0 comments

Comments

@AmilKey
Copy link

AmilKey commented Jul 25, 2024

Is your feature request related to a problem? Please describe.
I'm always frustrated when trying to use queries with isRealtime: true in services where the results are transformed into another array. The issue is that there is no trigger or callback for when onSnapshot updates occur, making it difficult to manage real-time data updates outside of a route.

Describe the solution you'd like
I would like to have a callback or trigger that fires whenever onSnapshot updates occur while using queries with isRealtime: true in services. This could be added to adapterOptions as an onUpdate callback, allowing us to handle real-time updates more effectively in different parts of the application, not just within a router.

adapterOptions: {
  isRealtime: true,
  onUpdate() {
    // trigger when collection is updated
  }
}
@AmilKey AmilKey changed the title Title: Add onUpdate Callback to adapterOptions for Real-Time Data Updates Add onUpdate Callback to adapterOptions for Real-Time Data Updates Jul 25, 2024
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

1 participant