Skip to content
Source
Sign inSign up
TanStack/query

fix(preact-query): hydrate unobserved queries before observers subscribe to avoid a redundant refetch #11157

Openostapondo(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/11157/headopened View on GitHub

Showing 3 changed files with 5 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
5 additions and 0 deletions.changeset/tidy-pugs-listen.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/preact-query': patch
+---
+​
+Hydrate queries nobody is observing as soon as `HydrationBoundary` commits, so a `useQuery` that remounts under it no longer refetches data the dehydrated state already contains.
packages/preact-query/src/__tests__/HydrationBoundary.test.tsxModified
View file
Loading the diff
packages/preact-query/src/HydrationBoundary.tsxModified
View file
Loading the diff