@tanstack/query-core
5.108.2 · 20 Nov 2026MIT101.3M / weekRepositoryHomepagenpmAtom feed
5.108.2 is the newest release of 5.x.
In short
1 removed1 deprecated16 fixed
- Removed
Remove experimental render-time prefetching and the
promiseproperty from query results. - Deprecated
Add query and infiniteQuery methods, deprecate old imperative methods
Release note
Minor Changes
- Deprecated
Add query and infiniteQuery methods, deprecate old imperative methods
Patch Changes
query-core: Clear a stale
selecterror when the observer switches to a query without data, and resetisPlaceholderDataon select-error results to match the declared result types, so a previous query's select error no longer leaks into the new resultImprove hydration performance by skipping no-op data transforms and default error-redaction callbacks.
Export dehydrateQuery.Reduce observer churn overhead by removing observers in place instead of copying the observer list for every unsubscribe.
query-core: Reset
isPlaceholderDatawhenselectthrows on placeholder dataFix
queryOptionsandinfiniteQueryOptionsreturn types so exported inferred options can be emitted in declaration files without leaking internal data tag symbols.Skip unused result tracking when notifying
useQuerieslisteners without acombinefunction.Avoid repeatedly synchronizing the same tracked property across all observers in
useQueries.Reattach
MutationObserverto its current mutation when a listener subscribes again, so auseMutationresult no longer stayspendingafter React tears down and re-establishes the subscription mid-mutation.Ignore a retained
pendingThenablesettlement callback invoked after the thenable has settled. Holding a reference toresolve/rejectand calling it later used to overwritestatusandreasoneven though the underlying promise had already settled, leaving the thenable advertising a state that disagreed with its value.Make mutation variables optional when
undefined extends TVariables- Removed
Remove experimental render-time prefetching and the
promiseproperty from query results. Release a mutation's retryer once its execution settles, so the settled promise no longer keeps that mutation's result, variables and context in memory for as long as the mutation cache retains it.
Release a query's retryer once its fetch settles, so the settled promise no longer keeps that fetch's raw result in memory alongside the structurally shared
state.data(or after the query is reset or removed).Resolve suspense when query data is set programmatically via setQueryData or streamedQuery. Previously, fetchOptimistic returned only the fetch promise, which left the Suspense boundary stuck until the queryFn completed — even when data already existed in the cache. The fix uses Promise.race with a cache subscriber to release suspense as soon as data becomes available.
Notify every query observer when another observer unsubscribes synchronously during the same query update.
resetQueries now preserves the queries matched before query.reset() changes their state.
Memoize falsy
combineresults when the function and query results are unchanged.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.