You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But as soon as the parent query is already prefetched by some other component, this component would throw a client() undefined error (see the provided sandbox for that) (Note that changing line (A) to wait for 300 ms will resolve the error, so there seems to be a race condition)
Describe the bug
Hey! First of all: thanks for you work on this great library!
While trying to run a query depending on another query in solid-query I noticed an error being thrown. The following approach seems to work at first:
But as soon as the parent query is already prefetched by some other component, this component would throw a
client() undefined
error (see the provided sandbox for that) (Note that changing line (A) to wait for 300 ms will resolve the error, so there seems to be a race condition)Your minimal, reproducible example
Stackblitz
Steps to reproduce
Click here to cause the error
link to navigate to/sub
await new Promise(r => setTimeout(r, 100));
toawait new Promise(r => setTimeout(r, 300));
/sub
-> seems there is some race conditionExpected behavior
As a user I would expect no error to be thrown, but there is an error thrown
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tanstack Query adapter
solid-query
TanStack Query version
v5.62.8
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: