T
TanStack4w ago
afraid-scarlet

General disabled state of collections?

I can only find the ´´´status is 'disabled'´´´ in the documentation of live queries: Looking at the following excerpt from the documentation (from the live-queries guide https://tanstack.com/db/latest/docs/guides/live-queries): Conditional Queries In React, you can conditionally disable a query by returning undefined or null from the useLiveQuery callback. When disabled, the hook returns a special state indicating the query is not active. (continues with a code example and further description and the info ´´´status is 'disabled'´´´) Why would that only work with react (If that is really the case)? And really: why is this not possible for simple query-collections? It seems like this would make a lot of sense to me, exact same use-case as in the code example: disable a query when no user is present, or forexample when auth-credentials are still missing for a rest api
1 Reply
like-gold
like-gold4w ago
it just needs implemented in other frameworks query (and other) collections are disabled by default until they're queried

Did you find this page helpful?