Skip to content

Commit 1fc705c

Browse files
Merge branch 'main' into types/vue-query-shallow
2 parents 0c757da + d4f4956 commit 1fc705c

File tree

31 files changed

+210
-102
lines changed

31 files changed

+210
-102
lines changed

docs/framework/react/plugins/createPersister.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ bun add @tanstack/query-persist-client-core
3939
- Pass that `persister` as an option to your Query. This can be done either by passing it to the `defaultOptions` of the `QueryClient` or to any `useQuery` hook instance.
4040
- If you pass this `persister` as `defaultOptions`, all queries will be persisted to the provided `storage`. You can additionally narrow this down by passing `filters`. In contrast to the `persistClient` plugin, this will not persist the whole query client as a single item, but each query separately. As a key, the query hash is used.
4141
- If you provide this `persister` to a single `useQuery` hook, only this Query will be persisted.
42+
- Note: `queryClient.setQueryData()` operations are not persisted, this means that if you perform an optimistic update and refresh the page before the query has been invalidated, your changes to the query data will be lost. See https://github.com/TanStack/query/issues/6310
4243

4344
This way, you do not need to store whole `QueryClient`, but choose what is worth to be persisted in your application. Each query is lazily restored (when the Query is first used) and persisted (after each run of the `queryFn`), so it does not need to be throttled. `staleTime` is also respected after restoring the Query, so if data is considered `stale`, it will be refetched immediately after restoring. If data is `fresh`, the `queryFn` will not run.
4445

docs/framework/vue/guides/disabling-queries.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ const { isLoading, isError, data, error, refetch, isFetching } = useQuery({
1818
</script>
1919
2020
<template>
21-
<button @click="refetch">Fetch Todos</button>
22-
<span v-if="isIdle">Not ready...</span>
23-
<span v-else-if="isError">Error: {{ error.message }}</span>
21+
<button @click="refetch()">Fetch Todos</button>
22+
<span v-if="isLoading">Loading...</span>
23+
<span v-else-if="isError">Error: {{ error?.message }}</span>
2424
<div v-else-if="data">
2525
<span v-if="isFetching">Fetching...</span>
2626
<ul>
2727
<li v-for="todo in data" :key="todo.id">{{ todo.title }}</li>
2828
</ul>
2929
</div>
30+
<span v-else>Not ready...</span>
3031
</template>
3132
```
3233

examples/angular/auto-refetching/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^19.2.4",
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
17-
"@tanstack/angular-query-experimental": "^5.72.2",
17+
"@tanstack/angular-query-experimental": "^5.72.3",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^19.2.4",
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
17-
"@tanstack/angular-query-experimental": "^5.72.2",
17+
"@tanstack/angular-query-experimental": "^5.72.3",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/devtools-panel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
1717
"@angular/router": "^19.2.4",
18-
"@tanstack/angular-query-devtools-experimental": "^5.72.2",
19-
"@tanstack/angular-query-experimental": "^5.72.2",
18+
"@tanstack/angular-query-devtools-experimental": "^5.72.3",
19+
"@tanstack/angular-query-experimental": "^5.72.3",
2020
"rxjs": "^7.8.2",
2121
"tslib": "^2.8.1",
2222
"zone.js": "0.15.0"

examples/angular/devtools-panel/src/app/components/lazy-load-devtools-panel-example.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export default class LazyLoadDevtoolsPanelExampleComponent {
5151
this.devtools.set(
5252
import('@tanstack/angular-query-devtools-experimental').then(
5353
({ injectDevtoolsPanel }) =>
54-
injectDevtoolsPanel(this.devToolsOptions, this.injector),
54+
injectDevtoolsPanel(this.devToolsOptions, {
55+
injector: this.injector,
56+
}),
5557
),
5658
)
5759
}

examples/angular/infinite-query-with-max-pages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^19.2.4",
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
17-
"@tanstack/angular-query-experimental": "^5.72.2",
17+
"@tanstack/angular-query-experimental": "^5.72.3",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/optimistic-updates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/forms": "^19.2.4",
1616
"@angular/platform-browser": "^19.2.4",
1717
"@angular/platform-browser-dynamic": "^19.2.4",
18-
"@tanstack/angular-query-experimental": "^5.72.2",
18+
"@tanstack/angular-query-experimental": "^5.72.3",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"zone.js": "0.15.0"

examples/angular/pagination/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^19.2.4",
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
17-
"@tanstack/angular-query-experimental": "^5.72.2",
17+
"@tanstack/angular-query-experimental": "^5.72.3",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/query-options-from-a-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/platform-browser": "^19.2.4",
1616
"@angular/platform-browser-dynamic": "^19.2.4",
1717
"@angular/router": "^19.2.4",
18-
"@tanstack/angular-query-experimental": "^5.72.2",
18+
"@tanstack/angular-query-experimental": "^5.72.3",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"zone.js": "0.15.0"

0 commit comments

Comments
 (0)