@tanstack/react-query
@tanstack/react-query (latest known version: 2026.0.0) has 17 known breaking changes on record, each backed by a source URL.
Recent changes
Version release-2026-07-22-0054 is a semver-major release over @tanstack/svelte-query-devtools@6.1.38, but no breaking change was detected in the release notes text - flagged for manual review.
Version @tanstack/solid-query@6.0.0-beta.6 is a semver-major release over @tanstack/angular-query-experimental@5.101.4, but no breaking change was detected in the release notes text - flagged for manual review.
- query-core: add custom reducer support to streamedQuery (#9532) (8f24580) by @marcog83 BREAKING CHANGE: The `maxChunks` parameter has been removed from `streamedQuery`. Use a custom `reducer` function to control data aggregation behavior instead. BREAKING CHANGE: When using a custom reducer function with `streamedQuery`, the `initialValue` parameter is now required and must be provided. - rename queryFn to streamFn in streamedQuery (#9606) (b25412a) by Dominik Dorfmeister BREAKING CHANGE: `queryFn` has been renamed to `streamFn`
BREAKING CHANGE: When using a custom reducer function with `streamedQuery`, the `initialValue` parameter is now required and must be provided. - rename queryFn to streamFn in streamedQuery (#9606) (b25412a) by Dominik Dorfmeister BREAKING CHANGE: `queryFn` has been renamed to `streamFn`
BREAKING CHANGE: The `maxChunks` parameter has been removed from `streamedQuery`. Use a custom `reducer` function to control data aggregation behavior instead. BREAKING CHANGE: When using a custom reducer function with `streamedQuery`, the `initialValue` parameter is now required and must be provided. - rename queryFn to streamFn in streamedQuery (#9606) (b25412a) by Dominik Dorfmeister BREAKING CHANGE: `queryFn` has been renamed to `streamFn`
- infinite-queries: rename defaultPageParam to initialPageParam (#5888) (3aa06807) by moshyfawn
Version 5.0.0 is a semver-major release over @tanstack/eslint-plugin-query@4.44.0, but no breaking change was detected in the release notes text - flagged for manual review.
* Query Keys (and Mutation Keys) need to be an Array * Separate hydration exports have been removed * `notifyOnChangeProps` property no longer accepts `"tracked"` as a value * `notifyOnChangePropsExclusion` has been removed * Consistent behavior for `cancelRefetch` * New Query Filters * Streamlined NotifyEvents * The `src/react` directory was renamed to `src/reactjs` * `onSuccess` is no longer called from `setQueryData` * `persistQueryClient` and the corresponding persister plugins are no longer experimental and have been renamed * The `cancel` method on promises is no longer supported * Queries and mutations, per default, need network connection to run * Removed undocumented methods from the `queryClient`
Version 4.0.0 is a semver-major release over 3.39.2, but no breaking change was detected in the release notes text - flagged for manual review.
Version 3.1.0 is a semver-major release over 2.26.4, but no breaking change was detected in the release notes text - flagged for manual review.
- Conditional, falsy or nullish query keys have been replaced by the `enabled` config flag. This flag must be a boolean-esque value, not a function. If you are looking to replace the throwable function option, you should instead use optional chaining, eg. `useQuery(user?.id, fn, { enabled: user?.id })`. - Dependent Queries (via the `enabled` option) will now start in a new `idle` state if they are initialized with no data and `enabled: false`. - `refetchQueries` has been replace by `invalidateQueries`. Previously, `refetchQueries` would refetch any query key it matched that was stale, even if it was not currently being used on the screen. This has changed and it will now only refetch active queries (those being subscribed to with useQuery and friends). All other queries that it matches will simply be marked as "stale" and be refetched when they are rendered next, if ever. You can also pass an `invalidateQueries(queryKey, { refetchActive: false })` option if you do not want active queries to refetch either. This should save some bandwidth for queries that were cached, but not in use that will no longer be fetched again until they are needed. - Config is now split into 3 parts, `shared`, `queries` and `mutations` ```js const globalConfig = { shared: { suspense, queryKeySerializerFn, }, queries: { ...shared, enabled, retry, retryDelay, staleTime, cacheTime, refetchOnWindowFocus, refetchInterval, queryFnParamsFilter, refetchOnMount, isDataEqual, onError, onSuccess, onSettled, throwOnError, useErrorBoundary, }, mutations: { ...shared, throwOnError, onMutate, onError, onSuccess, onSettled, useErrorBoundary, }, } ``` - All `force` options have been removed. Functions that are meant to update the query always will. If you need to check that a query is stale before calling one of these functions, you can use `queryCache.get(queryKey).state.isStale` to do so. - Optional `queryVariables` have been removed. These didn't make much sense to begin with, and if you still need them, you can just inline them in your query function anyway, eg. `useQuery(['hello', 'world'], (a, b) => queryFn(a, b, customVariable1, customVariable2))` - As a migration tool, falsy and functional query keys will throw an error now, showing you where you need to convert to use the `enabled` config option - `globalConfig.refetchAllOnWindowFocus`, which previous overlapped in fuctionality with the query-level `refetchOnWindowFocus` has been consolidated to a single `refetchOnWindowFocus` that can set in the the global `config.queries.refetchOnWindowFocus` and also on a per query basis. - The `refetch` function returned by useQuery and friends will now **always** trigger a refetch for the query, regardless if the query is stale or not. This is way more clear and reliable to deal with. - `prefetchQuery` will no longer disable the next render of that query using useQuery (and friends). Instead, the `staleTime` will be respected for the prefetchQuery call, so if `prefetchQuery(key, fn, { staletime: 5000 })` is called, and then `useQuery(key, fn, { staleTime: 1000 })` is rendered within those initial 5000 milliseconds, the query will not refetch in the background. But if the stale time has been reached by the time useQuery renders, it will refetch in the background. - `prefetchQuery`'s `force` option has been removed. When you call `prefetchQuery`, the queryFn will always be called, regardless if the query is stale or not. - `prefetchQuery`'s `throwOnError` option is now located in a fourth argument, after the query config, eg. `prefetchQuery(key, fn, config, { throwOnError: true })`
Version 2.0.0 is a semver-major release over 1.5.10, but no breaking change was detected in the release notes text - flagged for manual review.
Version 1.3.2 is a semver-major release over @tanstack/lit-query@0.2.11, but no breaking change was detected in the release notes text - flagged for manual review.
Check what changed for @tanstack/react-query since your installed version, live.
Open the playground →