Skip to content

Commit da93cc7

Browse files
author
gobbimar
committed
fix(docs): clarify reducer function description in streamedQuery documentation
1 parent 20e1d8d commit da93cc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/reference/streamedQuery.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ const query = queryOptions({
3535
- When set to `'replace'`, all data will be written to the cache once the stream ends.
3636
- `reducer?: (accumulator: TData, chunk: TQueryFnData) => TData`
3737
- 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.
38+
- Reduces streamed chunks (`TQueryFnData`) into the final data shape (`TData`).
39+
- 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`.
4041
- `initialValue?: TData = TQueryFnData`
4142
- Optional
4243
- Defines the initial data to be used while the first chunk is being fetched.

0 commit comments

Comments
 (0)