(config): object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:515](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L515)
+Defined in: [useLiveQuery.ts:474](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L474)
Create a live query using configuration object
@@ -590,6 +570,8 @@ Configuration object with query and options
### Returns
+`object` & `LiveQueryStatusFlags`
+
Object with reactive data, state, and status information
### Examples
@@ -630,10 +612,10 @@ return {data.length} items loaded
## Call Signature
```ts
-function useLiveQuery(config): object & LiveQueryStatusFlags & object;
+function useLiveQuery(config): object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:526](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L526)
+Defined in: [useLiveQuery.ts:485](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L485)
Create a live query using a query function.
@@ -651,109 +633,7 @@ Create a live query using a query function.
### Returns
-Object with reactive data, state, and status information
-
-### Examples
-
-```ts
-// Prefer config object syntax
-const { data, isLoading } = useLiveQuery({
- query: (q) =>
- q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.completed, false))
- .select(({ todos }) => ({ id: todos.id, text: todos.text }))
-})
-```
-
-```ts
-// Single result query
-const { data } = useLiveQuery({
- query: (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.id, 1))
- .findOne()
-})
-```
-
-```ts
-// Structured captured values are included in derived query identity
-const { data, state } = useLiveQuery({
- query: (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => gt(todos.priority, minPriority)),
-})
-```
-
-```ts
-// Return undefined or null to disable a query
-const { data, isEnabled } = useLiveQuery({
- query: (q) => {
- if (!userId) return undefined
- return q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.userId, userId))
- },
-})
-```
-
-```ts
-// Join pattern
-const { data } = useLiveQuery({
- query: (q) =>
- q.from({ issues: issueCollection })
- .join({ persons: personCollection }, ({ issues, persons }) =>
- eq(issues.userId, persons.id)
- )
- .select(({ issues, persons }) => ({
- id: issues.id,
- title: issues.title,
- userName: persons.name
- }))
-})
-```
-
-```ts
-// Handle loading and error states
-const { data, isLoading, isLoadingError, status } = useLiveQuery({
- query: (q) => q.from({ todos: todoCollection })
-})
-
-if (isLoading) return Loading...
-if (isLoadingError) return Error: {status}
-
-return (
-
- {data.map(todo => - {todo.text}
)}
-
-)
-```
-
-## Call Signature
-
-```ts
-function useLiveQuery(config, deps?): object & LiveQueryStatusFlags & object;
-```
-
-Defined in: [useLiveQuery.ts:537](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L537)
-
-Create a live query using a query function.
-
-### Type Parameters
-
-#### TContext
-
-`TContext` *extends* `Context`
-
-### Parameters
-
-#### config
-
-`LiveQueryCollectionConfig`\<`TContext`\>
-
-#### deps?
-
-`unknown`[]
-
-Deprecated array of dependencies that trigger query re-execution when changed
-
-### Returns
+`object` & `LiveQueryStatusFlags`
Object with reactive data, state, and status information
@@ -832,114 +712,10 @@ return (
## Call Signature
```ts
-function useLiveQuery(config, deps): object & LiveQueryStatusFlags & object;
+function useLiveQuery(liveQueryCollection): object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:549](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L549)
-
-Create a live query using a query function.
-
-### Type Parameters
-
-#### TContext
-
-`TContext` *extends* `Context`
-
-### Parameters
-
-#### config
-
-[`ConditionalUseLiveQueryConfig`](../type-aliases/ConditionalUseLiveQueryConfig.md)\<`TContext`\>
-
-#### deps
-
-`unknown`[]
-
-Deprecated array of dependencies that trigger query re-execution when changed
-
-### Returns
-
-Object with reactive data, state, and status information
-
-### Examples
-
-```ts
-// Prefer config object syntax
-const { data, isLoading } = useLiveQuery({
- query: (q) =>
- q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.completed, false))
- .select(({ todos }) => ({ id: todos.id, text: todos.text }))
-})
-```
-
-```ts
-// Single result query
-const { data } = useLiveQuery({
- query: (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.id, 1))
- .findOne()
-})
-```
-
-```ts
-// Structured captured values are included in derived query identity
-const { data, state } = useLiveQuery({
- query: (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => gt(todos.priority, minPriority)),
-})
-```
-
-```ts
-// Return undefined or null to disable a query
-const { data, isEnabled } = useLiveQuery({
- query: (q) => {
- if (!userId) return undefined
- return q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.userId, userId))
- },
-})
-```
-
-```ts
-// Join pattern
-const { data } = useLiveQuery({
- query: (q) =>
- q.from({ issues: issueCollection })
- .join({ persons: personCollection }, ({ issues, persons }) =>
- eq(issues.userId, persons.id)
- )
- .select(({ issues, persons }) => ({
- id: issues.id,
- title: issues.title,
- userName: persons.name
- }))
-})
-```
-
-```ts
-// Handle loading and error states
-const { data, isLoading, isLoadingError, status } = useLiveQuery({
- query: (q) => q.from({ todos: todoCollection })
-})
-
-if (isLoading) return Loading...
-if (isLoadingError) return Error: {status}
-
-return (
-
- {data.map(todo => - {todo.text}
)}
-
-)
-```
-
-## Call Signature
-
-```ts
-function useLiveQuery(liveQueryCollection): object & LiveQueryStatusFlags & object;
-```
-
-Defined in: [useLiveQuery.ts:590](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L590)
+Defined in: [useLiveQuery.ts:525](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L525)
Subscribe to an existing live query collection
@@ -967,6 +743,8 @@ Pre-created live query collection to subscribe to
### Returns
+`object` & `LiveQueryStatusFlags`
+
Object with reactive data, state, and status information
### Examples
@@ -1002,10 +780,10 @@ return {data.map(item => )}
## Call Signature
```ts
-function useLiveQuery(liveQueryCollection): object & LiveQueryStatusFlags & object;
+function useLiveQuery(liveQueryCollection): object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:605](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L605)
+Defined in: [useLiveQuery.ts:540](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L540)
Create a live query using a query function.
@@ -1031,6 +809,8 @@ Create a live query using a query function.
### Returns
+`object` & `LiveQueryStatusFlags`
+
Object with reactive data, state, and status information
### Examples
diff --git a/docs/framework/react/reference/functions/useLiveSuspenseQuery.md b/docs/framework/react/reference/functions/useLiveSuspenseQuery.md
index 942e84694d..bac36f5d2f 100644
--- a/docs/framework/react/reference/functions/useLiveSuspenseQuery.md
+++ b/docs/framework/react/reference/functions/useLiveSuspenseQuery.md
@@ -6,10 +6,10 @@ title: useLiveSuspenseQuery
## Call Signature
```ts
-function useLiveSuspenseQuery(queryFn, deps?): object;
+function useLiveSuspenseQuery(queryFn): object;
```
-Defined in: [useLiveSuspenseQuery.ts:156](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L156)
+Defined in: [useLiveSuspenseQuery.ts:154](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L154)
Create a live query with React Suspense support
@@ -27,12 +27,6 @@ Create a live query with React Suspense support
Query function that defines what data to fetch
-#### deps?
-
-`unknown`[]
-
-Deprecated array of dependencies that trigger query re-execution when changed
-
### Returns
`object`
@@ -171,7 +165,7 @@ function Profile({ userId }: { userId: string }) {
function useLiveSuspenseQuery(config): object;
```
-Defined in: [useLiveSuspenseQuery.ts:167](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L167)
+Defined in: [useLiveSuspenseQuery.ts:164](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L164)
Create a live query with React Suspense support
@@ -321,171 +315,11 @@ function Profile({ userId }: { userId: string }) {
## Call Signature
-```ts
-function useLiveSuspenseQuery(config, deps?): object;
-```
-
-Defined in: [useLiveSuspenseQuery.ts:177](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L177)
-
-Create a live query with React Suspense support
-
-### Type Parameters
-
-#### TContext
-
-`TContext` *extends* `Context`
-
-### Parameters
-
-#### config
-
-`LiveQueryCollectionConfig`\<`TContext`\>
-
-#### deps?
-
-`unknown`[]
-
-Deprecated array of dependencies that trigger query re-execution when changed
-
-### Returns
-
-`object`
-
-Object with reactive data and state - data is guaranteed to be defined
-
-#### collection
-
-```ts
-collection: Collection<{ [K in string | number | symbol]: ResultValue[K] }, string | number, {
-}>;
-```
-
-#### data
-
-```ts
-data: InferResultType;
-```
-
-#### health
-
-```ts
-health: HealthNode | undefined;
-```
-
-#### state
-
-```ts
-state: Map[K] }>;
-```
-
-### Throws
-
-Promise when data is loading (caught by Suspense boundary)
-
-### Throws
-
-Error when the first load fails or the Collection crashes (caught by
-an Error boundary): the cause itself when it is an Error, otherwise an Error
-with the problem's message (`health.error.message`) whose `cause` is the
-value the sync adapter reported
-
-### Examples
-
-```ts
-// Basic usage with Suspense
-function TodoList() {
- const { data } = useLiveSuspenseQuery({
- query: (q) =>
- q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.completed, false))
- .select(({ todos }) => ({ id: todos.id, text: todos.text }))
- })
-
- return (
-
- {data.map(todo => - {todo.text}
)}
-
- )
-}
-
-function App() {
- return (
- Loading...}>
-
-
- )
-}
-```
-
-```ts
-// Single result query
-const { data } = useLiveSuspenseQuery(
- (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => eq(todos.id, 1))
- .findOne()
-)
-// data is guaranteed to be the single item (or undefined if not found)
-```
-
-```ts
-// Structured captured values are included in derived query identity and trigger re-suspension
-const { data } = useLiveSuspenseQuery({
- query: (q) => q.from({ todos: todosCollection })
- .where(({ todos }) => gt(todos.priority, minPriority)),
-})
-```
-
-```ts
-// With Error boundary
-function App() {
- return (
- Error loading data}>
- Loading...}>
-
-
-
- )
-}
-```
-
-### Remarks
-
-**Important:** This hook does NOT support disabled queries (returning undefined/null).
-Following TanStack Query's useSuspenseQuery design, the query callback must always
-return a valid query, collection, or config object.
-
-❌ **This will cause a type error:**
-```ts
-useLiveSuspenseQuery(
- (q) => userId ? q.from({ users }) : undefined // ❌ Error!
-)
-```
-
-✅ **Use conditional rendering instead:**
-```ts
-function Profile({ userId }: { userId: string }) {
- const { data } = useLiveSuspenseQuery({
- query: (q) => q.from({ users }).where(({ users }) => eq(users.id, userId)),
- })
- return {data.name}
-}
-
-// In parent component:
-{userId ? : No user
}
-```
-
-✅ **For optional inputs, conditionally render a component with complete query inputs:**
-```ts
-{userId ? : No user
}
-```
-
-## Call Signature
-
```ts
function useLiveSuspenseQuery(liveQueryCollection): object;
```
-Defined in: [useLiveSuspenseQuery.ts:188](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L188)
+Defined in: [useLiveSuspenseQuery.ts:174](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L174)
Create a live query with React Suspense support
@@ -646,7 +480,7 @@ function Profile({ userId }: { userId: string }) {
function useLiveSuspenseQuery(liveQueryCollection): object;
```
-Defined in: [useLiveSuspenseQuery.ts:202](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L202)
+Defined in: [useLiveSuspenseQuery.ts:188](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveSuspenseQuery.ts#L188)
Create a live query with React Suspense support
diff --git a/docs/framework/react/reference/functions/usePacedMutations.md b/docs/framework/react/reference/functions/usePacedMutations.md
index fc004e3549..0987e6009c 100644
--- a/docs/framework/react/reference/functions/usePacedMutations.md
+++ b/docs/framework/react/reference/functions/usePacedMutations.md
@@ -76,7 +76,7 @@ function AutoSaveForm({ formId }: { formId: string }) {
// Optional: await persistence or handle errors
try {
- await tx.isPersisted.promise
+ await tx.when('settled')
console.log('Saved!')
} catch (error) {
console.error('Save failed:', error)
diff --git a/docs/framework/react/reference/type-aliases/ConditionalUseLiveQueryConfig.md b/docs/framework/react/reference/type-aliases/ConditionalUseLiveQueryConfig.md
index 79933c0089..f928182c17 100644
--- a/docs/framework/react/reference/type-aliases/ConditionalUseLiveQueryConfig.md
+++ b/docs/framework/react/reference/type-aliases/ConditionalUseLiveQueryConfig.md
@@ -7,7 +7,7 @@ title: ConditionalUseLiveQueryConfig
type ConditionalUseLiveQueryConfig = UseLiveQueryConfigOptions & object;
```
-Defined in: [useLiveQuery.ts:146](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L146)
+Defined in: [useLiveQuery.ts:143](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L143)
## Type Declaration
diff --git a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryConfig.md b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryConfig.md
index b0cd7defcb..806f21ebde 100644
--- a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryConfig.md
+++ b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryConfig.md
@@ -7,7 +7,7 @@ title: UseLiveInfiniteQueryConfig
type UseLiveInfiniteQueryConfig<_TContext> = object;
```
-Defined in: [useLiveInfiniteQuery.ts:46](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L46)
+Defined in: [useLiveInfiniteQuery.ts:44](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L44)
## Type Parameters
@@ -23,7 +23,7 @@ Defined in: [useLiveInfiniteQuery.ts:46](https://github.com/TanStack/db/blob/mai
optional client: DbClient;
```
-Defined in: [useLiveInfiniteQuery.ts:54](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L54)
+Defined in: [useLiveInfiniteQuery.ts:52](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L52)
Override the nearest DbProvider for this query.
@@ -35,7 +35,7 @@ Override the nearest DbProvider for this query.
optional initialPageParam: number;
```
-Defined in: [useLiveInfiniteQuery.ts:57](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L57)
+Defined in: [useLiveInfiniteQuery.ts:55](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L55)
First result-page label, not a server cursor or remote offset.
@@ -47,7 +47,7 @@ First result-page label, not a server cursor or remote offset.
optional pageSize: number;
```
-Defined in: [useLiveInfiniteQuery.ts:55](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L55)
+Defined in: [useLiveInfiniteQuery.ts:53](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L53)
***
@@ -57,7 +57,7 @@ Defined in: [useLiveInfiniteQuery.ts:55](https://github.com/TanStack/db/blob/mai
optional queryKey: LiveQueryKey;
```
-Defined in: [useLiveInfiniteQuery.ts:52](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L52)
+Defined in: [useLiveInfiniteQuery.ts:50](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L50)
Explicit identity for queries that contain opaque functional variants or
are hot enough that deriving identity from structured IR is too expensive.
diff --git a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturn.md b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturn.md
index dc99455d27..50fa2f7632 100644
--- a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturn.md
+++ b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturn.md
@@ -7,7 +7,7 @@ title: UseLiveInfiniteQueryReturn
type UseLiveInfiniteQueryReturn = Omit, "data"> & object;
```
-Defined in: [useLiveInfiniteQuery.ts:60](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L60)
+Defined in: [useLiveInfiniteQuery.ts:58](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L58)
## Type Declaration
diff --git a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturnWithCollection.md b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturnWithCollection.md
index 97d15813c7..dae229eb2f 100644
--- a/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturnWithCollection.md
+++ b/docs/framework/react/reference/type-aliases/UseLiveInfiniteQueryReturnWithCollection.md
@@ -4,26 +4,12 @@ title: UseLiveInfiniteQueryReturnWithCollection
---
```ts
-type UseLiveInfiniteQueryReturnWithCollection = object;
+type UseLiveInfiniteQueryReturnWithCollection = LiveQueryStatusFlags & object;
```
-Defined in: [useLiveInfiniteQuery.ts:72](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L72)
+Defined in: [useLiveInfiniteQuery.ts:70](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L70)
-## Type Parameters
-
-### TResult
-
-`TResult` *extends* `object`
-
-### TKey
-
-`TKey` *extends* `string` \| `number`
-
-### TUtils
-
-`TUtils` *extends* `Record`\<`string`, `any`\>
-
-## Properties
+## Type Declaration
### collection
@@ -31,184 +17,74 @@ Defined in: [useLiveInfiniteQuery.ts:72](https://github.com/TanStack/db/blob/mai
collection: Collection & NonSingleResult;
```
-Defined in: [useLiveInfiniteQuery.ts:79](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L79)
-
-***
-
### data
```ts
data: TResult[];
```
-Defined in: [useLiveInfiniteQuery.ts:77](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L77)
-
-***
-
### fetchNextPage()
```ts
fetchNextPage: () => Promise;
```
-Defined in: [useLiveInfiniteQuery.ts:94](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L94)
-
#### Returns
`Promise`\<`void`\>
-***
-
### hasNextPage
```ts
hasNextPage: boolean;
```
-Defined in: [useLiveInfiniteQuery.ts:95](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L95)
-
-***
-
-### health
-
-```ts
-health: HealthNode | undefined;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:97](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L97)
-
-***
-
-### isCleanedUp
-
-```ts
-isCleanedUp: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:88](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L88)
-
-***
-
-### isCrashed
-
-```ts
-isCrashed: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:87](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L87)
-
-Local storage or an invariant broke. Only a cascade cleanup and a fresh start recover.
-
-***
-
### isEnabled
```ts
isEnabled: true;
```
-Defined in: [useLiveInfiniteQuery.ts:91](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L91)
-
-***
-
### isFetchingNextPage
```ts
isFetchingNextPage: boolean;
```
-Defined in: [useLiveInfiniteQuery.ts:96](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L96)
-
-***
-
-### isIdle
-
-```ts
-isIdle: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:83](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L83)
-
-***
-
-### isLoading
-
-```ts
-isLoading: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:81](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L81)
-
-***
-
-### isLoadingError
-
-```ts
-isLoadingError: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:85](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L85)
-
-The first load failed: there is nothing to show.
-
-***
-
-### isReady
-
-```ts
-isReady: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:82](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L82)
-
-***
-
-### isSyncError
-
-```ts
-isSyncError: boolean;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:90](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L90)
-
-The data is shown, and a sync problem or failed page load is in `health`.
-
-***
-
### pageParams
```ts
pageParams: number[];
```
-Defined in: [useLiveInfiniteQuery.ts:93](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L93)
-
-***
-
### pages
```ts
pages: TResult[][];
```
-Defined in: [useLiveInfiniteQuery.ts:92](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L92)
-
-***
-
### state
```ts
state: Map;
```
-Defined in: [useLiveInfiniteQuery.ts:78](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L78)
-
-***
-
### status
```ts
status: CollectionStatus;
```
-Defined in: [useLiveInfiniteQuery.ts:80](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveInfiniteQuery.ts#L80)
+## Type Parameters
+
+### TResult
+
+`TResult` *extends* `object`
+
+### TKey
+
+`TKey` *extends* `string` \| `number`
+
+### TUtils
+
+`TUtils` *extends* `Record`\<`string`, `any`\>
diff --git a/docs/framework/react/reference/type-aliases/UseLiveQueryConfig.md b/docs/framework/react/reference/type-aliases/UseLiveQueryConfig.md
index 7eb2cf12c7..3037a719f2 100644
--- a/docs/framework/react/reference/type-aliases/UseLiveQueryConfig.md
+++ b/docs/framework/react/reference/type-aliases/UseLiveQueryConfig.md
@@ -7,7 +7,7 @@ title: UseLiveQueryConfig
type UseLiveQueryConfig = UseLiveQueryConfigOptions & Pick, "query">;
```
-Defined in: [useLiveQuery.ts:142](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L142)
+Defined in: [useLiveQuery.ts:139](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L139)
## Type Parameters
diff --git a/docs/framework/react/reference/type-aliases/UseLiveQueryStatus.md b/docs/framework/react/reference/type-aliases/UseLiveQueryStatus.md
index 56d9e814b7..878105acea 100644
--- a/docs/framework/react/reference/type-aliases/UseLiveQueryStatus.md
+++ b/docs/framework/react/reference/type-aliases/UseLiveQueryStatus.md
@@ -7,4 +7,4 @@ title: UseLiveQueryStatus
type UseLiveQueryStatus = CollectionStatus | "disabled";
```
-Defined in: [useLiveQuery.ts:116](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L116)
+Defined in: [useLiveQuery.ts:113](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQuery.ts#L113)
diff --git a/docs/framework/solid/reference/functions/useLiveQuery.md b/docs/framework/solid/reference/functions/useLiveQuery.md
index 85eaf48ad3..c0b0880c9b 100644
--- a/docs/framework/solid/reference/functions/useLiveQuery.md
+++ b/docs/framework/solid/reference/functions/useLiveQuery.md
@@ -6,10 +6,10 @@ title: useLiveQuery
## Call Signature
```ts
-function useLiveQuery(queryFn): Accessor> & object & LiveQueryStatusFlags & object;
+function useLiveQuery(queryFn): Accessor> & object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:123](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L123)
+Defined in: [useLiveQuery.ts:117](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L117)
Create a live query using a query function
@@ -29,6 +29,8 @@ Query function that defines what data to fetch
### Returns
+`Accessor`\<`InferResultType`\<`TContext`\>\> & `object` & `LiveQueryStatusFlags`
+
Accessor that returns data with Suspense support, with state and status information as properties
### Examples
@@ -106,10 +108,10 @@ return (
## Call Signature
```ts
-function useLiveQuery(queryFn): Accessor> & object & LiveQueryStatusFlags & object;
+function useLiveQuery(queryFn): Accessor> & object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:137](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L137)
+Defined in: [useLiveQuery.ts:126](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L126)
Create a live query using a query function
@@ -129,6 +131,8 @@ Query function that defines what data to fetch
### Returns
+`Accessor`\<`InferConditionalResultType`\<`TContext`\>\> & `object` & `LiveQueryStatusFlags`
+
Accessor that returns data with Suspense support, with state and status information as properties
### Examples
@@ -206,10 +210,10 @@ return (
## Call Signature
```ts
-function useLiveQuery(config): Accessor> & object & LiveQueryStatusFlags & object;
+function useLiveQuery(config): Accessor> & object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:193](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L193)
+Defined in: [useLiveQuery.ts:177](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L177)
Create a live query using configuration object
@@ -229,6 +233,8 @@ Configuration object with query and options
### Returns
+`Accessor`\<`InferResultType`\<`TContext`\>\> & `object` & `LiveQueryStatusFlags`
+
Accessor that returns data with Suspense support, with state and status information as properties
### Examples
@@ -275,10 +281,10 @@ return (
## Call Signature
```ts
-function useLiveQuery(liveQueryCollection): Accessor & object & LiveQueryStatusFlags & object;
+function useLiveQuery(liveQueryCollection): Accessor & object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:242](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L242)
+Defined in: [useLiveQuery.ts:221](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L221)
Subscribe to an existing live query collection
@@ -306,6 +312,8 @@ Pre-created live query collection to subscribe to
### Returns
+`Accessor`\<`TResult`[]\> & `object` & `LiveQueryStatusFlags`
+
Accessor that returns data with Suspense support, with state and status information as properties
### Examples
@@ -347,10 +355,10 @@ return (
## Call Signature
```ts
-function useLiveQuery(liveQueryCollection): Accessor & object & LiveQueryStatusFlags & object;
+function useLiveQuery(liveQueryCollection): Accessor & object & LiveQueryStatusFlags;
```
-Defined in: [useLiveQuery.ts:262](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L262)
+Defined in: [useLiveQuery.ts:236](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L236)
Create a live query using a query function
@@ -376,6 +384,8 @@ Create a live query using a query function
### Returns
+`Accessor`\<`TResult` \| `undefined`\> & `object` & `LiveQueryStatusFlags`
+
Accessor that returns data with Suspense support, with state and status information as properties
### Examples
diff --git a/docs/framework/svelte/reference/functions/useLiveQuery.md b/docs/framework/svelte/reference/functions/useLiveQuery.md
index fe4ba50f4a..d32caf4fbf 100644
--- a/docs/framework/svelte/reference/functions/useLiveQuery.md
+++ b/docs/framework/svelte/reference/functions/useLiveQuery.md
@@ -9,7 +9,7 @@ title: useLiveQuery
function useLiveQuery(queryFn, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: ResultValue[K] }, InferResultType>;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:221](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L221)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:203](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L203)
Create a live query using a query function
@@ -135,7 +135,7 @@ const todosQuery = useLiveQuery((q) =>
function useLiveQuery(queryFn, deps?): ConditionalUseLiveQueryReturn<{ [K in string | number | symbol]: ResultValue[K] }, InferConditionalResultType>;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:227](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L227)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:209](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L209)
Create a live query using a query function
@@ -261,7 +261,7 @@ const todosQuery = useLiveQuery((q) =>
function useLiveQuery(config, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: ResultValue[K] }, InferResultType>;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:275](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L275)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:257](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L257)
Create a live query using configuration object
@@ -334,7 +334,7 @@ const itemsQuery = useLiveQuery({
function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithCollection;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:324](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L324)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:306](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L306)
Subscribe to an existing query collection (can be reactive)
@@ -417,7 +417,7 @@ const queryResult = useLiveQuery(sharedQuery)
function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithCollection;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:335](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L335)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:317](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L317)
Create a live query using a query function
diff --git a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md
index 41e8734f78..06184e58b8 100644
--- a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md
+++ b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md
@@ -3,10 +3,14 @@ id: UseLiveQueryReturn
title: UseLiveQueryReturn
---
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:63](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L63)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:64](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L64)
Return type for useLiveQuery hook
+## Extends
+
+- `LiveQueryStatusFlags`
+
## Type Parameters
### T
@@ -26,7 +30,7 @@ collection: Collection;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:66](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L66)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:70](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L70)
The underlying query collection instance
@@ -38,103 +42,9 @@ The underlying query collection instance
data: TData;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:65](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L65)
-
-Reactive array of query results in order, or single item when using findOne()
-
-***
-
-### health
-
-```ts
-health: HealthNode | undefined;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:78](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L78)
-
-***
-
-### isCleanedUp
-
-```ts
-isCleanedUp: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:75](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L75)
-
-True when query has been cleaned up
-
-***
-
-### isCrashed
-
-```ts
-isCrashed: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:74](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L74)
-
-True when local storage or an invariant broke
-
-***
-
-### isIdle
-
-```ts
-isIdle: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:70](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L70)
-
-True when query hasn't started yet
-
-***
-
-### isLoading
-
-```ts
-isLoading: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:68](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L68)
-
-True while initial query data is loading
-
-***
-
-### isLoadingError
-
-```ts
-isLoadingError: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:72](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L72)
-
-True when the first load failed
-
-***
-
-### isReady
-
-```ts
-isReady: boolean;
-```
-
Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:69](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L69)
-True when query has received first data and is ready
-
-***
-
-### isSyncError
-
-```ts
-isSyncError: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:77](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L77)
-
-True when data is shown and `health` has a problem
+Reactive array of query results in order, or single item when using findOne()
***
@@ -144,7 +54,7 @@ True when data is shown and `health` has a problem
state: Map;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:64](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L64)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:68](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L68)
Reactive Map of query results (key → item)
@@ -156,6 +66,6 @@ Reactive Map of query results (key → item)
status: CollectionStatus;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:67](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L67)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:71](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L71)
Current query status
diff --git a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md
index 9d07c7de97..55429759ac 100644
--- a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md
+++ b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md
@@ -3,7 +3,11 @@ id: UseLiveQueryReturnWithCollection
title: UseLiveQueryReturnWithCollection
---
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:94](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L94)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:87](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L87)
+
+## Extends
+
+- `LiveQueryStatusFlags`
## Type Parameters
@@ -31,7 +35,7 @@ Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:94](https://github.co
collection: Collection;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:102](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L102)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:95](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L95)
***
@@ -41,93 +45,7 @@ Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:102](https://github.c
data: TData;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:101](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L101)
-
-***
-
-### health
-
-```ts
-health: HealthNode | undefined;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:114](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L114)
-
-***
-
-### isCleanedUp
-
-```ts
-isCleanedUp: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:111](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L111)
-
-***
-
-### isCrashed
-
-```ts
-isCrashed: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:110](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L110)
-
-Local storage or an invariant broke. Only a cascade cleanup and a fresh start recover.
-
-***
-
-### isIdle
-
-```ts
-isIdle: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:106](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L106)
-
-***
-
-### isLoading
-
-```ts
-isLoading: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:104](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L104)
-
-***
-
-### isLoadingError
-
-```ts
-isLoadingError: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:108](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L108)
-
-The first load failed: there is nothing to show.
-
-***
-
-### isReady
-
-```ts
-isReady: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:105](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L105)
-
-***
-
-### isSyncError
-
-```ts
-isSyncError: boolean;
-```
-
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:113](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L113)
-
-The data is shown, and a sync problem or failed request is in `health`.
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:94](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L94)
***
@@ -137,7 +55,7 @@ The data is shown, and a sync problem or failed request is in `health`.
state: Map;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:100](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L100)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:93](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L93)
***
@@ -147,4 +65,4 @@ Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:100](https://github.c
status: CollectionStatus;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:103](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L103)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:96](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L96)
diff --git a/docs/framework/svelte/reference/type-aliases/ConditionalUseLiveQueryReturn.md b/docs/framework/svelte/reference/type-aliases/ConditionalUseLiveQueryReturn.md
index 3e42d719d1..34c7e1e499 100644
--- a/docs/framework/svelte/reference/type-aliases/ConditionalUseLiveQueryReturn.md
+++ b/docs/framework/svelte/reference/type-aliases/ConditionalUseLiveQueryReturn.md
@@ -7,7 +7,7 @@ title: ConditionalUseLiveQueryReturn
type ConditionalUseLiveQueryReturn = Omit, "collection" | "status"> & object;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:86](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L86)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:79](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L79)
## Type Declaration
diff --git a/docs/framework/svelte/reference/type-aliases/UseLiveQueryConfig.md b/docs/framework/svelte/reference/type-aliases/UseLiveQueryConfig.md
index 847bd05f96..3904e0f12a 100644
--- a/docs/framework/svelte/reference/type-aliases/UseLiveQueryConfig.md
+++ b/docs/framework/svelte/reference/type-aliases/UseLiveQueryConfig.md
@@ -7,7 +7,7 @@ title: UseLiveQueryConfig
type UseLiveQueryConfig = LiveQueryHookConfig & object;
```
-Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:119](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L119)
+Defined in: [packages/svelte-db/src/useLiveQuery.svelte.ts:101](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L101)
## Type Declaration
diff --git a/docs/framework/vue/reference/functions/useLiveInfiniteQuery.md b/docs/framework/vue/reference/functions/useLiveInfiniteQuery.md
index 49e9dae5a1..0086490124 100644
--- a/docs/framework/vue/reference/functions/useLiveInfiniteQuery.md
+++ b/docs/framework/vue/reference/functions/useLiveInfiniteQuery.md
@@ -9,7 +9,7 @@ title: useLiveInfiniteQuery
function useLiveInfiniteQuery(liveQueryCollection, config): UseLiveInfiniteQueryReturnWithCollection;
```
-Defined in: [useLiveInfiniteQuery.ts:93](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L93)
+Defined in: [useLiveInfiniteQuery.ts:69](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L69)
Create a Vue-native reactive view over the shared live-query window
controller. The query must include an `orderBy` clause.
@@ -51,7 +51,7 @@ function useLiveInfiniteQuery(
deps?): UseLiveInfiniteQueryReturn;
```
-Defined in: [useLiveInfiniteQuery.ts:104](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L104)
+Defined in: [useLiveInfiniteQuery.ts:80](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L80)
Create a Vue-native reactive view over the shared live-query window
controller. The query must include an `orderBy` clause.
diff --git a/docs/framework/vue/reference/functions/useLiveQuery.md b/docs/framework/vue/reference/functions/useLiveQuery.md
index 1bf87a28c7..762d3d3fad 100644
--- a/docs/framework/vue/reference/functions/useLiveQuery.md
+++ b/docs/framework/vue/reference/functions/useLiveQuery.md
@@ -9,7 +9,7 @@ title: useLiveQuery
function useLiveQuery(queryFn, deps?): UseLiveQueryReturn;
```
-Defined in: [useLiveQuery.ts:168](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L168)
+Defined in: [useLiveQuery.ts:161](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L161)
Create a live query using a query function
@@ -95,7 +95,7 @@ const { data, isLoading, isLoadingError, status } = useLiveQuery((q) =>
function useLiveQuery(queryFn, deps?): ConditionalUseLiveQueryReturn;
```
-Defined in: [useLiveQuery.ts:174](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L174)
+Defined in: [useLiveQuery.ts:167](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L167)
Create a live query using a query function
@@ -181,7 +181,7 @@ const { data, isLoading, isLoadingError, status } = useLiveQuery((q) =>
function useLiveQuery(config, deps?): UseLiveQueryReturn;
```
-Defined in: [useLiveQuery.ts:214](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L214)
+Defined in: [useLiveQuery.ts:207](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L207)
Create a live query using configuration object
@@ -249,7 +249,7 @@ const { data, isLoading, isReady, isLoadingError } = useLiveQuery({
function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithCollection;
```
-Defined in: [useLiveQuery.ts:259](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L259)
+Defined in: [useLiveQuery.ts:252](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L252)
Subscribe to an existing query collection (can be reactive)
@@ -328,7 +328,7 @@ const { data, isLoading, isLoadingError } = useLiveQuery(sharedQuery)
function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithSingleResultCollection;
```
-Defined in: [useLiveQuery.ts:270](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L270)
+Defined in: [useLiveQuery.ts:263](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L263)
Create a live query using a query function
diff --git a/docs/framework/vue/reference/index.md b/docs/framework/vue/reference/index.md
index 6b46272af3..7d7f7b1a4a 100644
--- a/docs/framework/vue/reference/index.md
+++ b/docs/framework/vue/reference/index.md
@@ -7,7 +7,6 @@ title: "@tanstack/vue-db"
- [UseLiveInfiniteQueryReturn](interfaces/UseLiveInfiniteQueryReturn.md)
- [UseLiveInfiniteQueryReturnWithCollection](interfaces/UseLiveInfiniteQueryReturnWithCollection.md)
-- [UseLiveQueryFlags](interfaces/UseLiveQueryFlags.md)
- [UseLiveQueryReturn](interfaces/UseLiveQueryReturn.md)
- [UseLiveQueryReturnWithCollection](interfaces/UseLiveQueryReturnWithCollection.md)
- [UseLiveQueryReturnWithSingleResultCollection](interfaces/UseLiveQueryReturnWithSingleResultCollection.md)
@@ -17,6 +16,7 @@ title: "@tanstack/vue-db"
- [ConditionalUseLiveQueryReturn](type-aliases/ConditionalUseLiveQueryReturn.md)
- [LiveInfiniteQueryConfig](type-aliases/LiveInfiniteQueryConfig.md)
- [UseLiveInfiniteQueryConfig](type-aliases/UseLiveInfiniteQueryConfig.md)
+- [UseLiveQueryFlags](type-aliases/UseLiveQueryFlags.md)
## Functions
diff --git a/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturn.md b/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturn.md
index 1de47a8651..6b9c78fd3c 100644
--- a/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturn.md
+++ b/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturn.md
@@ -5,6 +5,12 @@ title: UseLiveInfiniteQueryReturn
Defined in: [useLiveInfiniteQuery.ts:35](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L35)
+The status and flag refs every `useLiveQuery` result has.
+
+## Extends
+
+- [`UseLiveQueryFlags`](../type-aliases/UseLiveQueryFlags.md)
+
## Type Parameters
### TContext
@@ -39,7 +45,7 @@ Defined in: [useLiveInfiniteQuery.ts:39](https://github.com/TanStack/db/blob/mai
fetchNextPage: () => Promise;
```
-Defined in: [useLiveInfiniteQuery.ts:56](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L56)
+Defined in: [useLiveInfiniteQuery.ts:45](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L45)
#### Returns
@@ -53,39 +59,7 @@ Defined in: [useLiveInfiniteQuery.ts:56](https://github.com/TanStack/db/blob/mai
hasNextPage: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:57](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L57)
-
-***
-
-### health
-
-```ts
-health: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:59](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L59)
-
-***
-
-### isCleanedUp
-
-```ts
-isCleanedUp: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:51](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L51)
-
-***
-
-### isCrashed
-
-```ts
-isCrashed: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:50](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L50)
-
-Local storage or an invariant broke. Only a cascade cleanup and a fresh start recover.
+Defined in: [useLiveInfiniteQuery.ts:46](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L46)
***
@@ -95,61 +69,7 @@ Local storage or an invariant broke. Only a cascade cleanup and a fresh start re
isFetchingNextPage: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:58](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L58)
-
-***
-
-### isIdle
-
-```ts
-isIdle: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:46](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L46)
-
-***
-
-### isLoading
-
-```ts
-isLoading: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:44](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L44)
-
-***
-
-### isLoadingError
-
-```ts
-isLoadingError: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:48](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L48)
-
-The first load failed: there is nothing to show.
-
-***
-
-### isReady
-
-```ts
-isReady: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:45](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L45)
-
-***
-
-### isSyncError
-
-```ts
-isSyncError: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:53](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L53)
-
-The data is shown, and a sync problem or failed request is in `health`.
+Defined in: [useLiveInfiniteQuery.ts:47](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L47)
***
@@ -159,7 +79,7 @@ The data is shown, and a sync problem or failed request is in `health`.
pageParams: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:55](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L55)
+Defined in: [useLiveInfiniteQuery.ts:44](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L44)
***
@@ -169,7 +89,7 @@ Defined in: [useLiveInfiniteQuery.ts:55](https://github.com/TanStack/db/blob/mai
pages: ComputedRef[number][][]>;
```
-Defined in: [useLiveInfiniteQuery.ts:54](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L54)
+Defined in: [useLiveInfiniteQuery.ts:43](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L43)
***
@@ -189,4 +109,10 @@ Defined in: [useLiveInfiniteQuery.ts:38](https://github.com/TanStack/db/blob/mai
status: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:43](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L43)
+Defined in: [useLiveQuery.ts:60](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L60)
+
+#### Inherited from
+
+```ts
+UseLiveQueryFlags.status
+```
diff --git a/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturnWithCollection.md b/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturnWithCollection.md
index 5d5f56cb35..9ac0d42751 100644
--- a/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturnWithCollection.md
+++ b/docs/framework/vue/reference/interfaces/UseLiveInfiniteQueryReturnWithCollection.md
@@ -3,7 +3,13 @@ id: UseLiveInfiniteQueryReturnWithCollection
title: UseLiveInfiniteQueryReturnWithCollection
---
-Defined in: [useLiveInfiniteQuery.ts:62](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L62)
+Defined in: [useLiveInfiniteQuery.ts:50](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L50)
+
+The status and flag refs every `useLiveQuery` result has.
+
+## Extends
+
+- [`UseLiveQueryFlags`](../type-aliases/UseLiveQueryFlags.md)
## Type Parameters
@@ -27,7 +33,7 @@ Defined in: [useLiveInfiniteQuery.ts:62](https://github.com/TanStack/db/blob/mai
collection: ComputedRef, TResult>>;
```
-Defined in: [useLiveInfiniteQuery.ts:69](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L69)
+Defined in: [useLiveInfiniteQuery.ts:57](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L57)
***
@@ -37,7 +43,7 @@ Defined in: [useLiveInfiniteQuery.ts:69](https://github.com/TanStack/db/blob/mai
data: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:68](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L68)
+Defined in: [useLiveInfiniteQuery.ts:56](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L56)
***
@@ -47,7 +53,7 @@ Defined in: [useLiveInfiniteQuery.ts:68](https://github.com/TanStack/db/blob/mai
fetchNextPage: () => Promise;
```
-Defined in: [useLiveInfiniteQuery.ts:83](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L83)
+Defined in: [useLiveInfiniteQuery.ts:60](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L60)
#### Returns
@@ -61,39 +67,7 @@ Defined in: [useLiveInfiniteQuery.ts:83](https://github.com/TanStack/db/blob/mai
hasNextPage: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:84](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L84)
-
-***
-
-### health
-
-```ts
-health: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:86](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L86)
-
-***
-
-### isCleanedUp
-
-```ts
-isCleanedUp: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:78](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L78)
-
-***
-
-### isCrashed
-
-```ts
-isCrashed: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:77](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L77)
-
-Local storage or an invariant broke. Only a cascade cleanup and a fresh start recover.
+Defined in: [useLiveInfiniteQuery.ts:61](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L61)
***
@@ -103,61 +77,7 @@ Local storage or an invariant broke. Only a cascade cleanup and a fresh start re
isFetchingNextPage: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:85](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L85)
-
-***
-
-### isIdle
-
-```ts
-isIdle: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:73](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L73)
-
-***
-
-### isLoading
-
-```ts
-isLoading: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:71](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L71)
-
-***
-
-### isLoadingError
-
-```ts
-isLoadingError: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:75](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L75)
-
-The first load failed: there is nothing to show.
-
-***
-
-### isReady
-
-```ts
-isReady: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:72](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L72)
-
-***
-
-### isSyncError
-
-```ts
-isSyncError: ComputedRef;
-```
-
-Defined in: [useLiveInfiniteQuery.ts:80](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L80)
-
-The data is shown, and a sync problem or failed request is in `health`.
+Defined in: [useLiveInfiniteQuery.ts:62](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L62)
***
@@ -167,7 +87,7 @@ The data is shown, and a sync problem or failed request is in `health`.
pageParams: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:82](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L82)
+Defined in: [useLiveInfiniteQuery.ts:59](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L59)
***
@@ -177,7 +97,7 @@ Defined in: [useLiveInfiniteQuery.ts:82](https://github.com/TanStack/db/blob/mai
pages: ComputedRef;
```
-Defined in: [useLiveInfiniteQuery.ts:81](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L81)
+Defined in: [useLiveInfiniteQuery.ts:58](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveInfiniteQuery.ts#L58)
***
@@ -187,7 +107,7 @@ Defined in: [useLiveInfiniteQuery.ts:81](https://github.com/TanStack/db/blob/mai
state: ComputedRef