Closed dhulme closed 9 months ago
For an unknown reason, the code works in code sandbox, but not when I run the same code example on my machine or my colleague's machine.
not sure what's up with the sandbox, but it's somehow using an older version of react-query.
here is a fork with an update to the latest version that shows the issue:
this seems like a regression from:
I need to see if I can fix that issue differently.
Describe the bug
The
result
parameter incombine
function in ReactuseQueries
is initially an empty array. This doesn't match the typing that says each item is a UseQueryResult.Your minimal, reproducible example
https://codesandbox.io/p/devbox/divine-pine-l3nw5l
Steps to reproduce
Run example and look in the console, it shows an error (see screenshot below).
For an unknown reason, the code works in code sandbox, but not when I run the same code example on my machine or my colleague's machine. Please could you try and reproduce locally copying the 3 files in the example?
Expected behavior
I expect queries to be defined on first render, but I receive
undefined
How often does this bug happen?
Every time
Screenshots or Videos
Error shown on Chrome on my machine:
Platform
Tanstack Query adapter
react-query
TanStack Query version
v5.15.3
TypeScript version
No response
Additional context
No response