We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5ab5a1 commit 5a4c8dbCopy full SHA for 5a4c8db
1 file changed
packages/query-core/src/hydration.ts
@@ -253,6 +253,7 @@ export function hydrate(
253
...(state.status === 'pending' &&
254
data !== undefined && {
255
status: 'success' as const,
256
+ dataUpdatedAt: dehydratedAt ?? Date.now(),
257
// Preserve existing fetchStatus if the existing query is actively fetching.
258
...(!existingQueryIsFetching && {
259
fetchStatus: 'idle' as const,
@@ -284,6 +285,10 @@ export function hydrate(
284
285
state.status === 'pending' && data !== undefined
286
? 'success'
287
: state.status,
288
+ ...(state.status === 'pending' &&
289
+ data !== undefined && {
290
291
+ }),
292
},
293
)
294
}
0 commit comments