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
Copy file name to clipboardExpand all lines: docs/src/pages/guides/infinite-queries.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,3 +141,48 @@ queryClient.setQueryData('projects', data => ({
141
141
pageParams:data.pageParams.slice(1),
142
142
}))
143
143
```
144
+
145
+
## What if I want to enable/disable infinite queries reactively?
146
+
147
+
Sometimes you may want to enable or disable a Query by using a svelte [reactive statement](https://svelte.dev/tutorial/reactive-statements). In this case, you can use the `setEnabled` function:
148
+
149
+
```markdown
150
+
<script>
151
+
import { useInfiniteQuery } from '@sveltestack/svelte-query'
Copy file name to clipboardExpand all lines: docs/src/pages/guides/queries.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,3 +86,32 @@ If booleans aren't your thing, you can always use the `status` state as well:
86
86
</ul>
87
87
{/if}
88
88
```
89
+
90
+
## What if I want to enable/disable queries reactively?
91
+
92
+
Sometimes you may want to enable or disable a Query by using a svelte [reactive statement](https://svelte.dev/tutorial/reactive-statements). In this case, you can use the `setEnabled` function:
93
+
94
+
```markdown
95
+
<script>
96
+
import { useQuery } from '@sveltestack/svelte-query';
0 commit comments