useQuery and pass in a query object that depends on some data. If that data isn't available or isn't loaded yet, they'll set enabled: false to disable the query. However, disabling a query only prevents the query from running, and it may still return cached data (see https://tanstack.com/query/latest/docs/framework/react/guides/disabling-queries). People then write the rest of the code expecting data to be undefined, but in prod that data will sometimes happen to be cached by some other part of the app and users will get all of that cached data instead of undefined and the UI will break or behave unexpectedly.useQuery to have the resulting data always be undefined if enabled is false since that's what people on our team expect to happen. Is there any downside to doing this?useQuery with what I believe are the correct types (I copy-pasted most of the code from the useQuery implementation). I don't love having to use useMemo but it seemed preferable to updating data directly on the returned object.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