5 Replies
flat-fuchsiaOP•16mo ago
I don't understand how modules.data can be undefined. I provide initialData coming from the loaders.
harsh-harlequin•16mo ago
With suspense, you don't need i initialData
The only way it can be undefined is if the queryFn returns undefined (which it shouldn't do)
flat-fuchsiaOP•16mo ago
if I would use useQuery instead, since I use initial data coming from the loader. It should still not be able to be undefined right?
harsh-harlequin•16mo ago
with useQuery, you need
initialData
. With suspense, you don't.
please share your queryFn
because I think the issue must be in there.flat-fuchsiaOP•16mo ago
I have similar issues with infiniteQuery where pages can be undefined
maybe my queryParamsToAray is broken?
@TkDodo 🔮 I got rid of all suspenses. but same issue.
ahhhh, I think I got it, they have the same keys when queryParamsToArray is empty and when I go to one page, and then to the other one, it uses the cache, but because one is infinite the format is different....