persistQueryClient function to restore, subscribe and save query cache to async storage.persistQueryClientSubscribe subscribes to all changes in query cache and calls persistQueryClientSave in callback:persistQueryClientSave is called every time when e.g. query status change or new useQuery hook is mounted on new screen. Basically in my app persistQueryClientSave is called a lot and even with throttling enabled it still feels that sometimes it is called unnecessarily.["users"] and I have useQuery hooks for this key mounted both in screen A and screen B. They both have staleTime set to 1 hour.persistQueryClientSave is called because subscriber is triggered by observerAdded or observerOptionsUpdated events.persistQueryClientSave only if data in any query is updated? Maybe there is a way to subscribe only for data changes? Or maybe I'm missing something and it works like that for a reason?persistQueryClientSave in onSuccess callback in default options. Although I don't really like this solution because it will break if onSuccess is overwritten and it also is called multiple times if more useQuery hooks are mounted for single query.https://x.com/tan_stack/status/2031128535470104577?s=20
dry-scarlet · 5h ago
https://x.com/powersync_/status/2010721010006552775?s=20
dry-scarlet · 2mo ago
You can now submit your website/app/project to http://TanStack.com 's new showcase and have it seen by the TanStack community! - Global showcase browser - Per-library filters - Category filters Submit here: https://tanstack.com/showcase/submit View all here: https://tanstack.com/showcase
dry-scarlet · 3mo ago