T
TanStack•3y ago
stormy-gold

All useQuery data is undefined...

Hi all, a bit of a weird error, but all of my useQuery data is undefined. I'm using axios, react-query v3, and I'm using react query (same version) on two projects. One project, is works just fine, the other one, every query is undefined. When I set the res.data to a variable on the bugged project, I can see the data no problem. In my other project, it works no problem as intended. The queries all return successes as well, they all load, return a 200 success, and become stale right on schedule. What on earth could be happening here?
6 Replies
stormy-gold
stormy-goldOP•3y ago
update, migrated the project to react-query v4 all data is still null (i guess its now null instead of undefined?)
rare-sapphire
rare-sapphire•3y ago
Hi an unstable queryclient ? Could you show a reproduction ?
stormy-gold
stormy-goldOP•3y ago
I'm not sure what you mean reproduction, could you specify?
rare-sapphire
rare-sapphire•3y ago
A codesandbox with a reproduction of the problem. It is easier to help with some code to read 😅 And by setting up a reproduction the solution may show up by its own
fascinating-indigo
fascinating-indigo•3y ago
React Query FAQs
Answering the most frequently asked React Query questions
stormy-gold
stormy-goldOP•3y ago
Thank you for this, I’ll look into it. Your blog is legendary and helped a lot when I was first learning the library! Cheers!

Did you find this page helpful?