We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7281525 commit dfe94eaCopy full SHA for dfe94ea
1 file changed
src/App.tsx
@@ -13,8 +13,16 @@ function App() {
13
14
// Example of a watch query using useQuery hook
15
// This demonstrates how to fetch and automatically update data when the underlying table changes
16
+ // using an incremental watch query - see here https://docs.powersync.com/usage/use-case-examples/watch-queries#incremental-watch-queries
17
const { data: counters, isLoading } = useQuery<CounterRecord>(
- `SELECT * FROM ${COUNTER_TABLE} ORDER BY created_at ASC`
18
+ `SELECT * FROM ${COUNTER_TABLE} ORDER BY created_at ASC`,
19
+ [],
20
+ {
21
+ rowComparator: {
22
+ keyBy: (item) => item.id,
23
+ compareBy: (item) => JSON.stringify(item)
24
+ }
25
26
);
27
28
// Get the current authenticated user's ID from Supabase on component mount
0 commit comments