We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20e1d8d commit da93cc7Copy full SHA for da93cc7
1 file changed
docs/reference/streamedQuery.md
@@ -35,8 +35,9 @@ const query = queryOptions({
35
- When set to `'replace'`, all data will be written to the cache once the stream ends.
36
- `reducer?: (accumulator: TData, chunk: TQueryFnData) => TData`
37
- Optional
38
- - A function to reduce the streamed chunks into the final data.
39
- - Defaults to a function that appends chunks to the end of the array.
+ - Reduces streamed chunks (`TQueryFnData`) into the final data shape (`TData`).
+ - Default: appends each chunk to the end of the accumulator when `TData` is an array.
40
+ - If `TData` is not an array, you must provide a custom `reducer`.
41
- `initialValue?: TData = TQueryFnData`
42
43
- Defines the initial data to be used while the first chunk is being fetched.
0 commit comments