Skip to content

Commit c947b0d

Browse files
authored
Merge branch 'main' into fix-some-a11y-issues-in-devtools
2 parents 08dc070 + 411f030 commit c947b0d

File tree

95 files changed

+304
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+304
-112
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ jobs:
6969
Sizes for commit ${{ env.COMMIT_SHA }}:
7070
| Branch | Bundle Size |
7171
|--------|--------|
72-
| Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
73-
| This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
72+
| Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) |
73+
| This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) |
7474
continue-on-error: true
7575
provenance:
7676
name: Provenance

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<br />
88

99
<div align="center">
10-
<a href="https://www.npmjs.com/package/@tanstack/query-core" target="\_parent">
10+
<a href="https://www.npmjs.com/package/@tanstack/query-core" target="_parent">
1111
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/query-core.svg" alt="npm downloads" />
1212
</a>
13-
<a href="https://github.com/TanStack/query/" target="\_parent">
13+
<a href="https://github.com/TanStack/query/stargazers" target="_parent">
1414
<img alt="" src="https://img.shields.io/github/stars/TanStack/query.svg?style=social&label=Star" alt="GitHub stars" />
1515
</a>
16-
<a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent">
16+
<a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="_parent">
1717
<img alt="" src="https://deno.bundlejs.com/?q=@tanstack/react-query&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}}&badge=detailed" alt="Bundle size" />
1818
</a>
1919
</div>

docs/framework/angular/guides/background-fetching-indicators.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
id: background-fetching-indicators
33
title: Background Fetching Indicators
44
ref: docs/framework/react/guides/background-fetching-indicators.md
5+
replace:
6+
{
7+
'useIsFetching': 'injectIsFetching',
8+
'hook': 'function',
9+
'@tanstack/react-query': '@tanstack/angular-query-experimental',
10+
}
511
---
612

713
[//]: # 'Example'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ so it will only be true if the query is currently fetching for the first time.
9797

9898
If you are using TypeScript, you can use the `skipToken` to disable a query. This is useful when you want to disable a query based on a condition, but you still want to keep the query to be type safe.
9999

100-
> IMPORTANT: `refetch` from `useQuery` will not work with `skipToken`. Other than that, `skipToken` works the same as `enabled: false`.
100+
> **IMPORTANT**: `refetch` from `useQuery` will not work with `skipToken`. Calling `refetch()` on a query that uses `skipToken` will result in a `Missing queryFn` error because there is no valid query function to execute. If you need to manually trigger queries, consider using `enabled: false` instead, which allows `refetch()` to work properly. Other than this limitation, `skipToken` works the same as `enabled: false`.
101101
102102
[//]: # 'Example3'
103103

docs/framework/react/guides/query-retries.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,28 @@ const result = useQuery({
7878
```
7979

8080
[//]: # 'Example3'
81+
82+
## Background Retry Behavior
83+
84+
When using `refetchInterval` with `refetchIntervalInBackground: true`, retries will pause when the browser tab is inactive. This happens because retries respect the same focus behavior as regular refetches.
85+
86+
If you need continuous retries in the background, consider disabling retries and implementing a custom refetch strategy:
87+
88+
[//]: # 'Example4'
89+
90+
```tsx
91+
const result = useQuery({
92+
queryKey: ['todos'],
93+
queryFn: fetchTodos,
94+
refetchInterval: (query) => {
95+
// Refetch more frequently when in error state
96+
return query.state.status === 'error' ? 5000 : 30000
97+
},
98+
refetchIntervalInBackground: true,
99+
retry: false, // Disable built-in retries
100+
})
101+
```
102+
103+
[//]: # 'Example4'
104+
105+
This approach lets you control retry timing manually while keeping refetches active in the background.

docs/framework/solid/guides/request-waterfalls.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ replace:
1111
'useQuery[(]': 'useQuery(() => ',
1212
'useQueries[(]': 'useQueries(() => ',
1313
'useInfiniteQuery[(]': 'useInfiniteQuery(() => ',
14+
'useSuspenseQuery': 'useQuery',
15+
'useSuspenseQueries': 'useQueries',
1416
}
1517
---

docs/framework/solid/guides/suspense.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,24 @@ import { Suspense } from 'solid-js'
1616

1717
You can use async `suspense` function that is provided by `solid-query`.
1818

19-
```vue
20-
<script>
21-
import { defineComponent } from 'vue'
19+
```tsx
2220
import { useQuery } from '@tanstack/solid-query'
2321

2422
const todoFetcher = async () =>
2523
await fetch('https://jsonplaceholder.cypress.io/todos').then((response) =>
2624
response.json(),
2725
)
28-
export default defineComponent({
29-
name: 'SuspendableComponent',
30-
async setup() {
31-
const { data, suspense } = useQuery(() => ['todos'], todoFetcher)
32-
await suspense()
33-
34-
return { data }
35-
},
36-
})
37-
</script>
26+
27+
function SuspendableComponent() {
28+
const query = useQuery(() => ({
29+
queryKey: ['todos'],
30+
queryFn: todoFetcher,
31+
}))
32+
33+
// Accessing query.data directly inside a <Suspense> boundary
34+
// automatically triggers suspension until data is ready
35+
return <div>Data: {JSON.stringify(query.data)}</div>
36+
}
3837
```
3938

4039
## Fetch-on-render vs Render-as-you-fetch

examples/angular/auto-refetching/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.90.7",
16+
"@tanstack/angular-query-experimental": "^5.90.8",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"zone.js": "0.15.0"

examples/angular/basic-persister/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.90.7",
17-
"@tanstack/angular-query-persist-client": "^5.62.12",
18-
"@tanstack/query-async-storage-persister": "^5.90.7",
16+
"@tanstack/angular-query-experimental": "^5.90.8",
17+
"@tanstack/angular-query-persist-client": "^5.62.13",
18+
"@tanstack/query-async-storage-persister": "^5.90.8",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"zone.js": "0.15.0"

examples/angular/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.90.7",
16+
"@tanstack/angular-query-experimental": "^5.90.8",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"zone.js": "0.15.0"

0 commit comments

Comments
 (0)