tanstack_query 1.2.6
tanstack_query: ^1.2.6 copied to clipboard
Widgets that help state management of asynchronous operations such as sending HTTP requests, getting the response, and caching the result.
1.2.6 (15/04/26) #
- Fix: Garbage collection bug where active
Querycould be evicted afterinvalidateQueries()orclear()— mirrors React's GC lifecycle exactly. - Arch:
QueryObservermirrors React's GC lifecycle exactly by rebuilding the underlyingQueryreference after cache invalidation. - Arch: Rework
useInfiniteQueryinternals to mirror React's architecture exactly — extractInfiniteQueryBehavior(port ofinfiniteQueryBehavior.ts), rewriteInfiniteQueryObserver(port ofInfiniteQueryObserver.ts), and hook behavior intoQuery.fetch()for React-parity dedup, direction tracking, and page management. - Fix:
isFetchingNextPageincorrectlytrueon remount afterfetchNextPage. - Fix: Rapid
fetchNextPagecalls no longer cause stuckisFetchingNextPagestate. - Fix: Mismatched generic cache entries (e.g.
InfiniteQueryResult<Object>for auseInfiniteQuery<int>) are now safely detected and discarded, triggering a fresh fetch.
1.2.5 (23/01/26) #
- Fix: Prevent infinite widget rebuilds when passing inline (non-const)
mutationKeytouseMutation.
1.2.4 (18/01/26) #
- Correct default GC Time to 5 minutes
1.2.3 (18/01/26) #
- refactor queryObservers
- add useInfiniteQuery properties result (isFetchingPreviousPage, isFetchNextPageError, hasNextPage, ...)
1.2.2 (17/01/26) #
- add context to mutation callbacks
- bug fixes and performance improvements
1.2.1 (14/01/26) #
- upgrade sdk requirement
- fix analysis
1.2.0 (14/01/26) #
- add refetchOnMount, initialData & placeholderData features
- rework refetchOnWindowFocus refetchOnReconnect
1.1.1 (04/01/26) #
- Clean dart format
1.1.0 (04/01/26) #
- Rework internals: move hook logic into core
QueryObserver/QueryandMutationObserver/Mutation. - Move
QueryCacheintoQueryClientand remove legacyQueryClient.Instance. - Implement
gcTimeand garbage collection scheduling for inactive queries. - Add
retry/retryDelaysupport (exponential backoff) andRetryer; add fixes/tests for retry behavior (includinguseInfiniteQuery). - Expose
mutateAsyncandresetMutationAPIs. - Fix observer subscriber management and refactor with
Removable. - Update docs, changelogs, dartdoc and add tests.
1.0.2 (30/12/25) #
- Add dartdoc comments.
1.0.1 (28/12/25) #
- Add
useQueryClienthook to retrieve the activeQueryClientfrom widget context.
1.0.0 (18/12/25) #
- First version with primary hooks (useQuery, useMutation, useInfiniteQuery)