Skip to content

Commit

Permalink
chore: examples to react19 (#8408)
Browse files Browse the repository at this point in the history
* chore: examples to react19

* test: seems like pre-warming adds another render, which is fine

* test: more pre-warming renders (this is fine)

* test: use react-render-stream

* chore: move tests to renderStream

* chore: fix act

* test: fix remaining tests

* test: move away from fireEvent.click

because it uses `act` under the hood, which isn't supported / wanted with renderStreams

* test: useInfiniteQuery to renderStream

* chore: stabilize test
  • Loading branch information
TkDodo authored Dec 10, 2024
1 parent aef7ba2 commit 27ce0b6
Show file tree
Hide file tree
Showing 29 changed files with 1,155 additions and 699 deletions.
4 changes: 2 additions & 2 deletions examples/react/algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@algolia/client-search": "5.2.1",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.62.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic-graphql-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@tanstack/react-query-devtools": "^5.62.3",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"@tanstack/react-query-persist-client": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.62.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/default-query-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/devtools-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/nextjs-app-prefetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"next": "^15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "npm:types-react@rc",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@tanstack/react-query-devtools": "^5.62.3",
"@tanstack/react-query-persist-client": "^5.62.3",
"msw": "^2.6.6",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hot-toast": "^2.4.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/react/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"expo": "^52.0.11",
"expo-constants": "^17.0.3",
"expo-status-bar": "^2.0.0",
"react": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-native": "^0.76.3",
"react-native-gesture-handler": "^2.20.2",
"react-native-paper": "^5.12.5",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"@tanstack/react-query-devtools": "^5.62.3",
"localforage": "^1.10.0",
"match-sorter": "^6.3.4",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.25.1",
"react-router-dom": "^6.25.1",
"rooks": "^7.14.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/rick-morty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@mui/styles": "^6.1.8",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.25.1",
"react-router-dom": "^6.25.1"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/shadow-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "npm:types-react@rc",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/star-wars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@mui/styles": "^6.1.8",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.25.1",
"react-router-dom": "^6.25.1"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-query-devtools": "^5.62.3",
"font-awesome": "^4.7.0",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^4.1.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions integrations/react-next-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"next": "^15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tupleson": "0.23.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions integrations/react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"@vitejs/plugin-react": "^4.3.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vite": "^5.3.5"
}
}
4 changes: 2 additions & 2 deletions integrations/react-webpack-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dependencies": {
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@babel/core": "^7.26.0",
Expand Down
4 changes: 2 additions & 2 deletions integrations/react-webpack-5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dependencies": {
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@babel/core": "^7.26.0",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.3.2",
"publint": "^0.2.12",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rimraf": "^6.0.1",
"sherif": "^1.0.0",
"tsup": "8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@testing-library/react": "^16.0.1",
"@types/react": "npm:types-react@rc",
"@vitejs/plugin-react": "^4.3.3",
"react": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0"
},
"peerDependencies": {
"@tanstack/react-query": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-next-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@types/react": "npm:types-react@rc",
"@vitejs/plugin-react": "^4.3.3",
"next": "^14.2.18",
"react": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0"
},
"peerDependencies": {
"@tanstack/react-query": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-persist-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@testing-library/react": "^16.0.1",
"@types/react": "npm:types-react@rc",
"@vitejs/plugin-react": "^4.3.3",
"react": "19.0.0-rc-66855b96-20241106"
"react": "^19.0.0"
},
"peerDependencies": {
"@tanstack/react-query": "workspace:^",
Expand Down
5 changes: 3 additions & 2 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@
"devDependencies": {
"@tanstack/query-persist-client-core": "workspace:*",
"@testing-library/react": "^16.0.1",
"@testing-library/react-render-stream": "^2.0.0",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitejs/plugin-react": "^4.3.3",
"eslint-plugin-react-compiler": "19.0.0-beta-0dec889-20241115",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^4.1.2"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 27ce0b6

Please sign in to comment.