Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions examples/react/algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"@algolia/client-search": "4.11.0",
"@algolia/transporter": "4.11.0",
"algoliasearch": "4.12.2"
"@algolia/client-search": "4.17.1",
"@algolia/transporter": "4.17.1",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"algoliasearch": "4.17.1"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^4.13.0",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@tanstack/eslint-plugin-query": "^5.0.0-alpha.36",
"@types/react": "^18.2.4",
"@types/react-dom": "^18.2.4",
"@vitejs/plugin-react": "^4.0.0",
"vite": "^4.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"vite": "^4.2.0"
},
"browserslist": {
"production": [
Expand Down
6 changes: 3 additions & 3 deletions examples/react/auto-refetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"axios": "^1.4.0",
"isomorphic-unfetch": "3.0.0",
"next": "12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"react-dom": "^18.2.0"
},
"scripts": {
"dev": "next",
Expand Down
10 changes: 5 additions & 5 deletions examples/react/basic-graphql-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
},
"dependencies": {
"graphql": "^16.6.0",
"graphql-request": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"graphql-request": "^6.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.0",
Expand Down
20 changes: 10 additions & 10 deletions examples/react/basic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"@tanstack/react-query-persist-client": "^5.0.0-alpha.38",
"@tanstack/query-sync-storage-persister": "^5.0.0-alpha.38",
"axios": "^1.4.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"@tanstack/react-query-persist-client": "^4.7.1",
"@tanstack/query-sync-storage-persister": "^4.7.1"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^4.13.0",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@tanstack/eslint-plugin-query": "^5.0.0-alpha.36",
"@types/react": "^18.2.4",
"@types/react-dom": "^18.2.4",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.8.0",
"typescript": "^5.0.4",
"vite": "^4.2.0"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"axios": "^1.4.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^4.13.0",
"@tanstack/eslint-plugin-query": "^5.0.0-alpha.36",
"@vitejs/plugin-react": "^4.0.0",
"vite": "^4.2.0"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/default-query-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
},
"dependencies": {
"axios": "^1.4.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/infinite-query-with-max-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intersection-observer": "^8.33.1",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"scripts": {
"dev": "next",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/load-more-infinite-scroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intersection-observer": "^8.33.1",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"scripts": {
"dev": "next",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"next": "12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"resolve-from": "^5.0.0",
"web-streams-polyfill": "^3.0.3"
},
Expand Down
14 changes: 7 additions & 7 deletions examples/react/offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"@tanstack/react-location": "^3.7.0",
"ky": "^0.33.0",
"msw": "^0.39.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-hot-toast": "^2.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"@tanstack/react-query-persist-client": "^4.7.1",
"@tanstack/query-sync-storage-persister": "^4.7.1"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"@tanstack/react-query-persist-client": "^5.0.0-alpha.38",
"@tanstack/query-sync-storage-persister": "^5.0.0-alpha.38"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/react/optimistic-updates-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"main": "pages/index.tsx",
"license": "MIT",
"dependencies": {
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"axios": "^1.4.0",
"isomorphic-unfetch": "3.0.0",
"next": "12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^18.13.0",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@types/react": "^18.2.4",
"@types/react-dom": "^18.2.4",
"typescript": "^5.0.4"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/react/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"axios": "^1.4.0",
"isomorphic-unfetch": "3.0.0",
"next": "12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"react-dom": "^18.2.0"
},
"scripts": {
"dev": "next",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"preview": "vite preview"
},
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/prefetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"next": "12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1"
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38"
},
"scripts": {
"dev": "next",
Expand Down
6 changes: 3 additions & 3 deletions examples/react/react-native/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
focusManager,
} from '@tanstack/react-query';

import { useAppState } from '@app/hooks/useAppState';
import { MoviesStack } from '@app/navigation/MoviesStack';
import { useOnlineManager } from '@app/hooks/useOnlineManager';
import { useAppState } from './src/hooks/useAppState';
import { MoviesStack } from './src/navigation/MoviesStack';
import { useOnlineManager } from './src/hooks/useOnlineManager';

function onAppStateChange(status: AppStateStatus) {
// React Query already supports in web browser refetch on window focus by default
Expand Down
4 changes: 1 addition & 3 deletions examples/react/react-native/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
Expand Down
13 changes: 1 addition & 12 deletions examples/react/react-native/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
module.exports = function (api) {
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
root: ['./src'],
alias: {
'@app': './src',
},
},
],
],
};
};
45 changes: 21 additions & 24 deletions examples/react/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,31 @@
"dev:check": "pnpm prettier:check & pnpm lint:check & pnpm type:check"
},
"dependencies": {
"@react-navigation/stack": "^6.0.2",
"@react-navigation/native": "^6.0.2",
"@react-native-community/netinfo": "6.0.2",
"expo": "~43.0.2",
"expo-status-bar": "~1.1.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-web": "0.17.1",
"@tanstack/react-query": "^4.7.1",
"@tanstack/react-query-devtools": "^4.7.1",
"expo-constants": "~12.1.3",
"react-native-paper": "4.9.2",
"react-native-screens": "~3.8.0",
"react-native-reanimated": "~2.2.0",
"react-native-gesture-handler": "~1.10.2",
"react-native-safe-area-context": "3.3.2"
"@react-native-community/netinfo": "^9.3.7",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"@tanstack/react-query": "^5.0.0-alpha.38",
"@tanstack/react-query-devtools": "^5.0.0-alpha.38",
"expo": "^48.0.17",
"expo-constants": "^14.2.1",
"expo-status-bar": "^1.4.4",
"react": "^18.2.0",
"react-native": "^0.71.8",
"react-native-gesture-handler": "^2.9.0",
"react-native-paper": "^5.8.0",
"react-native-reanimated": "^2.14.4",
"react-native-safe-area-context": "^4.5.0",
"react-native-screens": "^3.20.0",
"react-native-web": "^0.18.12"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@callstack/eslint-config": "^10.1.0",
"@expo/config": "^3.3.27",
"@types/react-native": "~0.64.3",
"babel-eslint": "^10.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"@babel/core": "^7.21.8",
"@callstack/eslint-config": "^13.0.2",
"@expo/config": "^8.0.2",
"@types/react-native": "^0.71.0",
"eslint": "^8.34.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.8.8",
"typescript": "^5.0.4"
Expand Down
4 changes: 2 additions & 2 deletions examples/react/react-native/src/navigation/MoviesStack.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import { createStackNavigator } from '@react-navigation/stack';

import { MoviesListScreen } from '../screens/MoviesListScreen';
import { MovieDetailsScreen } from '../screens/MovieDetailsScreen';
import { MoviesStackNavigator } from './types';
import { MoviesListScreen } from '@app/screens/MoviesListScreen';
import { MovieDetailsScreen } from '@app/screens/MovieDetailsScreen';

const Stack = createStackNavigator<MoviesStackNavigator>();

Expand Down
2 changes: 1 addition & 1 deletion examples/react/react-native/src/navigation/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Movie } from '@app/lib/api';
import { Movie } from '../lib/api';

export type MoviesStackNavigator = {
MoviesList: undefined;
Expand Down
10 changes: 5 additions & 5 deletions examples/react/react-native/src/screens/MovieDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { StackNavigationProp } from '@react-navigation/stack';
import { RouteProp } from '@react-navigation/native';
import { useQuery } from '@tanstack/react-query';

import { LoadingIndicator } from '@app/components/LoadingIndicator';
import { ErrorMessage } from '@app/components/ErrorMessage';
import { useRefreshByUser } from '@app/hooks/useRefreshByUser';
import { fetchMovie, MovieDetails } from '@app/lib/api';
import type { MoviesStackNavigator } from '@app/navigation/types';
import { LoadingIndicator } from '../components/LoadingIndicator';
import { ErrorMessage } from '../components/ErrorMessage';
import { useRefreshByUser } from '../hooks/useRefreshByUser';
import { fetchMovie, MovieDetails } from '../lib/api';
import type { MoviesStackNavigator } from '../navigation/types';

type MoviesDetailsScreenNavigationProp = StackNavigationProp<
MoviesStackNavigator,
Expand Down
Loading