File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/react/src/hooks/watched Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments