You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Potentially breaking change] The `useQuery` hook results are now explicitly defined as readonly. These values should not be mutated.
6
+
7
+
- Added the ability to limit re-renders by specifying a `rowComparator` for query results. The `useQuery` hook will only emit `data` changes when the data has changed.
8
+
9
+
```javascript
10
+
// The data here will maintain previous object references for unchanged items.
11
+
const { data } =useQuery('SELECT * FROM lists WHERE name = ?', ['aname'], {
12
+
rowComparator: {
13
+
keyBy: (item) =>item.id,
14
+
compareBy: (item) =>JSON.stringify(item)
15
+
}
16
+
});
17
+
```
18
+
19
+
- Added the ability to subscribe to an existing instance of a `WatchedQuery`
20
+
21
+
```vue
22
+
<script setup>
23
+
import { useWatchedQuerySubscription } from '@powersync/vue';
Improved query behaviour when client is closed. Pending requests will be aborted, future requests will be rejected with an Error. Fixed read and write lock requests not respecting timeout parameter.
- Added the ability to limit re-renders by specifying a `rowComparator` for query results. The `useQuery` hook will only emit `data` changes when the data has changed.
6
+
7
+
```javascript
8
+
// The data here will maintain previous object references for unchanged items.
9
+
const { data } =useQuery('SELECT * FROM lists WHERE name = ?', ['aname'], {
10
+
rowComparator: {
11
+
keyBy: (item) =>item.id,
12
+
compareBy: (item) =>JSON.stringify(item)
13
+
}
14
+
});
15
+
```
16
+
17
+
- Added the ability to subscribe to an existing instance of a `WatchedQuery`
0 commit comments