data
inside combine
is undefined when using useSuspenseQueries
#7197
Labels
data
inside combine
is undefined when using useSuspenseQueries
#7197
Describe the bug
The types for
data
when usinguseSuspenseQueries
withcombine
say that it’s notundefined
, but it appears thatcombine
is called when individual queries still haveisLoading: true
(i.e. before the component unsuspends). I’m not sure if this is a typing bug, or whethercombine
shouldn’t be called untildata
is populated (this seems more reasonable to me).Your minimal, reproducible example
https://codesandbox.io/p/devbox/elegant-wozniak-tgds5q?file=%2Fsrc%2Findex.tsx
Steps to reproduce
Cannot read properties of undefined (reading 'value')
Expected behavior
Either a TypeScript error or no runtime error.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tanstack Query adapter
react-query
TanStack Query version
5.28.9
TypeScript version
5.4.3
Additional context
No response
The text was updated successfully, but these errors were encountered: