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

Subscribe to datastore listener to refresh data in realtime #80

Open
aurelticot opened this issue Jan 18, 2023 · 0 comments
Open

Subscribe to datastore listener to refresh data in realtime #80

aurelticot opened this issue Jan 18, 2023 · 0 comments

Comments

@aurelticot
Copy link
Member

Find a way to subscribe to the datastore listener and refresh react-query to update its cache.

Likely to need to get the datastore instance in the page component, use useEffect to listen to events, and remove the listener in the cleanup function.
Then the listener would use an instance queryClient to invalidate the cache of the actual queryKey. This will make the query to be refetched.

@aurelticot aurelticot added this to the beta milestone Feb 27, 2023
@aurelticot aurelticot removed this from the beta milestone Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant