Skip to content

Commit 822d8f0

Browse files
React docs cleanup
1 parent 37d1a78 commit 822d8f0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/react/src/hooks/watched/useQuery.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import { constructCompatibleQuery } from './watch-utils';
2222
* }
2323
*
2424
* export const DiffComponent = () => {
25-
* // A differential query will emit results when a change to the result set occurs.
25+
* // Providing a `rowComparator` results in the hook using an incremental query under the hood.
26+
* // An incremental query will only emit results when a change to the result set occurs.
2627
* // The internal array object references are maintained for unchanged rows.
27-
* // The returned lists array is read only when a `comparator` is provided.
28+
* // The returned lists array is read only when a `rowComparator` is provided.
2829
* const { data: lists } = useQuery('SELECT * from lists', [], {
2930
* rowComparator: {
3031
* keyBy: (item) => item.id,

packages/react/src/hooks/watched/useWatchedQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { InternalHookOptions } from './watch-utils';
66
/**
77
* @internal This is not exported from the index.ts
88
*
9-
* When a differential query is used the return type is readonly. This is required
9+
* When an incremental query is used the return type is readonly. This is required
1010
* since the implementation requires a stable ref.
1111
* For legacy compatibility we allow mutating when a standard query is used. Mutations should
1212
* not affect the internal implementation in this case.

0 commit comments

Comments
 (0)