Skip to content

Commit 9fd6fbe

Browse files
authored
Merge branch 'main' into react-query/test/use-fake-timer-HydrationBoundary
2 parents 1be4d16 + ed2d4e9 commit 9fd6fbe

File tree

93 files changed

+347
-307
lines changed

Some content is hidden

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

93 files changed

+347
-307
lines changed

docs/framework/react/community/community-projects.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ The Missing Fullstack Toolkit for Next.js
2525

2626
Link: https://blitzjs.com/
2727

28+
## Connect
29+
30+
A family of libraries for building building browser and gRPC-compatible HTTP APIs.
31+
32+
Link: https://connectrpc.com/docs
33+
2834
## GraphQL Code Generator
2935

3036
Generate React Query hooks from your GraphQL schema

docs/framework/react/guides/optimistic-updates.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ const addTodoMutation = useMutation({
1616
mutationFn: (newTodo: string) => axios.post('/api/data', { text: newTodo }),
1717
// make sure to _return_ the Promise from the query invalidation
1818
// so that the mutation stays in `pending` state until the refetch is finished
19-
onSettled: async () => {
20-
return await queryClient.invalidateQueries({ queryKey: ['todos'] })
21-
},
19+
onSettled: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
2220
})
2321

2422
const { isPending, submittedAt, variables, mutate, isError } = addTodoMutation
@@ -121,9 +119,7 @@ useMutation({
121119
queryClient.setQueryData(['todos'], context.previousTodos)
122120
},
123121
// Always refetch after error or success:
124-
onSettled: () => {
125-
queryClient.invalidateQueries({ queryKey: ['todos'] })
126-
},
122+
onSettled: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
127123
})
128124
```
129125

@@ -159,9 +155,8 @@ useMutation({
159155
)
160156
},
161157
// Always refetch after error or success:
162-
onSettled: (newTodo) => {
163-
queryClient.invalidateQueries({ queryKey: ['todos', newTodo.id] })
164-
},
158+
onSettled: (newTodo) =>
159+
queryClient.invalidateQueries({ queryKey: ['todos', newTodo.id] }),
165160
})
166161
```
167162

@@ -175,7 +170,7 @@ You can also use the `onSettled` function in place of the separate `onError` and
175170
useMutation({
176171
mutationFn: updateTodo,
177172
// ...
178-
onSettled: (newTodo, error, variables, context) => {
173+
onSettled: async (newTodo, error, variables, context) => {
179174
if (error) {
180175
// do something
181176
}

docs/framework/react/overview.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: overview
33
title: Overview
44
---
55

6-
TanStack Query (FKA React Query) is often described as the missing data-fetching library for web applications, but in more technical terms, it makes **fetching, caching, synchronizing and updating server state** in your web applications a breeze.
6+
TanStack Query (formerly known as React Query) is often described as the missing data-fetching library for web applications, but in more technical terms, it makes **fetching, caching, synchronizing and updating server state** in your web applications a breeze.
77

88
## Motivation
99

@@ -29,11 +29,11 @@ Once you grasp the nature of server state in your application, **even more chall
2929

3030
If you're not overwhelmed by that list, then that must mean that you've probably solved all of your server state problems already and deserve an award. However, if you are like a vast majority of people, you either have yet to tackle all or most of these challenges and we're only scratching the surface!
3131

32-
React Query is hands down one of the _best_ libraries for managing server state. It works amazingly well **out-of-the-box, with zero-config, and can be customized** to your liking as your application grows.
32+
TanStack Query is hands down one of the _best_ libraries for managing server state. It works amazingly well **out-of-the-box, with zero-config, and can be customized** to your liking as your application grows.
3333

34-
React Query allows you to defeat and overcome the tricky challenges and hurdles of _server state_ and control your app data before it starts to control you.
34+
TanStack Query allows you to defeat and overcome the tricky challenges and hurdles of _server state_ and control your app data before it starts to control you.
3535

36-
On a more technical note, React Query will likely:
36+
On a more technical note, TanStack Query will likely:
3737

3838
- Help you remove **many** lines of complicated and misunderstood code from your application and replace with just a handful of lines of React Query logic.
3939
- Make your application more maintainable and easier to build new features without worrying about wiring up new server state data sources
@@ -44,7 +44,7 @@ On a more technical note, React Query will likely:
4444

4545
## Enough talk, show me some code already!
4646

47-
In the example below, you can see React Query in its most basic and simple form being used to fetch the GitHub stats for the React Query GitHub project itself:
47+
In the example below, you can see TanStack Query in its most basic and simple form being used to fetch the GitHub stats for the TanStack Query GitHub project itself:
4848

4949
[Open in StackBlitz](https://stackblitz.com/github/TanStack/query/tree/main/examples/react/simple)
5050

@@ -95,7 +95,7 @@ function Example() {
9595

9696
## You talked me into it, so what now?
9797

98-
- Consider taking the official [React Query Course](https://query.gg?s=tanstack) (or buying it for your whole team!)
99-
- Learn React Query at your own pace with our amazingly thorough [Walkthrough Guide](./installation.md) and [API Reference](./reference/useQuery.md)
98+
- Consider taking the official [TanStack Query Course](https://query.gg?s=tanstack) (or buying it for your whole team!)
99+
- Learn TanStack Query at your own pace with our amazingly thorough [Walkthrough Guide](./installation.md) and [API Reference](./reference/useQuery.md)
100100

101101
[//]: # 'Materials'

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.1.0-next.0",
1515
"@angular/platform-browser": "^19.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
17-
"@tanstack/angular-query-experimental": "^5.69.1",
17+
"@tanstack/angular-query-experimental": "^5.69.2",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
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.1.0-next.0",
1515
"@angular/platform-browser": "^19.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
17-
"@tanstack/angular-query-experimental": "^5.69.1",
17+
"@tanstack/angular-query-experimental": "^5.69.2",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
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.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
1717
"@angular/router": "^19.1.0-next.0",
18-
"@tanstack/angular-query-devtools-experimental": "^5.69.1",
19-
"@tanstack/angular-query-experimental": "^5.69.1",
18+
"@tanstack/angular-query-devtools-experimental": "^5.69.2",
19+
"@tanstack/angular-query-experimental": "^5.69.2",
2020
"rxjs": "^7.8.1",
2121
"tslib": "^2.6.3",
2222
"zone.js": "^0.15.0"

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.1.0-next.0",
1515
"@angular/platform-browser": "^19.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
17-
"@tanstack/angular-query-experimental": "^5.69.1",
17+
"@tanstack/angular-query-experimental": "^5.69.2",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
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.1.0-next.0",
1616
"@angular/platform-browser": "^19.1.0-next.0",
1717
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
18-
"@tanstack/angular-query-experimental": "^5.69.1",
18+
"@tanstack/angular-query-experimental": "^5.69.2",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
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.1.0-next.0",
1515
"@angular/platform-browser": "^19.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
17-
"@tanstack/angular-query-experimental": "^5.69.1",
17+
"@tanstack/angular-query-experimental": "^5.69.2",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
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.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
1717
"@angular/router": "^19.1.0-next.0",
18-
"@tanstack/angular-query-experimental": "^5.69.1",
18+
"@tanstack/angular-query-experimental": "^5.69.2",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
2121
"zone.js": "^0.15.0"

examples/angular/router/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.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
1717
"@angular/router": "^19.1.0-next.0",
18-
"@tanstack/angular-query-experimental": "^5.69.1",
18+
"@tanstack/angular-query-experimental": "^5.69.2",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
2121
"zone.js": "^0.15.0"

examples/angular/rxjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/forms": "19.1.0-next.0",
1616
"@angular/platform-browser": "^19.1.0-next.0",
1717
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
18-
"@tanstack/angular-query-experimental": "^5.69.1",
18+
"@tanstack/angular-query-experimental": "^5.69.2",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
2121
"zone.js": "^0.15.0"

examples/angular/simple/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^19.1.0-next.0",
1515
"@angular/platform-browser": "^19.1.0-next.0",
1616
"@angular/platform-browser-dynamic": "^19.1.0-next.0",
17-
"@tanstack/angular-query-experimental": "^5.69.1",
17+
"@tanstack/angular-query-experimental": "^5.69.2",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
2020
"zone.js": "^0.15.0"

examples/react/algolia/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
},
1010
"dependencies": {
1111
"@algolia/client-search": "5.2.1",
12-
"@tanstack/react-query": "^5.69.0",
13-
"@tanstack/react-query-devtools": "^5.69.0",
12+
"@tanstack/react-query": "^5.69.2",
13+
"@tanstack/react-query-devtools": "^5.69.2",
1414
"react": "^19.0.0",
1515
"react-dom": "^19.0.0"
1616
},

examples/react/auto-refetching/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/basic-graphql-request/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"graphql": "^16.9.0",
1414
"graphql-request": "^7.1.2",
1515
"react": "^19.0.0",

examples/react/basic/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/query-sync-storage-persister": "^5.69.0",
12-
"@tanstack/react-query": "^5.69.0",
13-
"@tanstack/react-query-devtools": "^5.69.0",
14-
"@tanstack/react-query-persist-client": "^5.69.0",
11+
"@tanstack/query-sync-storage-persister": "^5.69.2",
12+
"@tanstack/react-query": "^5.69.2",
13+
"@tanstack/react-query-devtools": "^5.69.2",
14+
"@tanstack/react-query-persist-client": "^5.69.2",
1515
"react": "^19.0.0",
1616
"react-dom": "^19.0.0"
1717
},

examples/react/chat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"react": "^19.0.0",
1414
"react-dom": "^19.0.0"
1515
},

examples/react/default-query-function/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"react": "^19.0.0",
1414
"react-dom": "^19.0.0"
1515
},

examples/react/devtools-panel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"react": "^19.0.0",
1414
"react-dom": "^19.0.0"
1515
},

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/load-more-infinite-scroll/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0",

examples/react/nextjs-app-prefetching/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^15.1.0",
1414
"react": "^19.0.0",
1515
"react-dom": "^19.0.0"

examples/react/nextjs-suspense-streaming/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
13-
"@tanstack/react-query-next-experimental": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
13+
"@tanstack/react-query-next-experimental": "^5.69.2",
1414
"next": "^14.2.20",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0"

examples/react/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/offline/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/query-sync-storage-persister": "^5.69.0",
11+
"@tanstack/query-sync-storage-persister": "^5.69.2",
1212
"@tanstack/react-location": "^3.7.4",
13-
"@tanstack/react-query": "^5.69.0",
14-
"@tanstack/react-query-devtools": "^5.69.0",
15-
"@tanstack/react-query-persist-client": "^5.69.0",
13+
"@tanstack/react-query": "^5.69.2",
14+
"@tanstack/react-query-devtools": "^5.69.2",
15+
"@tanstack/react-query-persist-client": "^5.69.2",
1616
"msw": "^2.6.6",
1717
"react": "^19.0.0",
1818
"react-dom": "^19.0.0",

examples/react/optimistic-updates-cache/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/optimistic-updates-cache/src/pages/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ function Example() {
7575
}
7676
},
7777
// Always refetch after error or success:
78-
onSettled: () => {
79-
queryClient.invalidateQueries({ queryKey: ['todos'] })
80-
},
78+
onSettled: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
8179
})
8280

8381
return (

examples/react/optimistic-updates-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/pagination/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"next": "^14.2.20",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"

examples/react/playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.69.0",
12-
"@tanstack/react-query-devtools": "^5.69.0",
11+
"@tanstack/react-query": "^5.69.2",
12+
"@tanstack/react-query-devtools": "^5.69.2",
1313
"react": "^19.0.0",
1414
"react-dom": "^19.0.0"
1515
},

0 commit comments

Comments
 (0)