Skip to content

Commit b362190

Browse files
haznaiKyleAMathews
andauthored
Clarify Tanstack query conventions and refetchInterval
Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
1 parent dc9d015 commit b362190

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/collections/query-collection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Query collections provide seamless integration between TanStack DB and TanStack
1010

1111
The `@tanstack/query-db-collection` package allows you to create collections that:
1212

13-
- Automatically sync with remote data via TanStack Query (when using `liveQueryCollectionOptions`)
13+
- Automatically fetch remote data via TanStack Query
1414
- Support optimistic updates with automatic rollback on errors
1515
- Handle persistence through customizable mutation handlers
1616
- Provide direct write capabilities for directly writing to the sync store
@@ -58,7 +58,7 @@ The `queryCollectionOptions` function accepts the following options:
5858

5959
- `select`: Function that lets extract array items when they're wrapped with metadata
6060
- `enabled`: Whether the query should automatically run (default: `true`)
61-
- `refetchInterval`: Refetch interval in milliseconds (has to be set to automatically sync when passing base `queryCollectionOptions`)
61+
- `refetchInterval`: Refetch interval in milliseconds (default: 0 — set an interval to enable polling refetching)
6262
- `retry`: Retry configuration for failed queries
6363
- `retryDelay`: Delay between retries
6464
- `staleTime`: How long data is considered fresh

0 commit comments

Comments
 (0)