Suspense sometimes not resolving
Hi there,
I've got a bit of a strange issue which I believe is a bug in solid-query. I've got a reproduction here https://stackblitz.com/edit/solidjs-templates-al24pp?file=src%2FApp.tsx
When typing into the input slowly everything works correctly, however spamming keys quickly can sometimes cause it to get stuck in a loading state. I believe it might be a race condition somewhere, as my demo doesn't actually reproduce it quite as reliably as the app I extracted it from.
If I switch to using
createResource
directly then I can't reproduce the issue which is why I think it might be a solid-query bug: https://stackblitz.com/edit/solidjs-templates-n3phg5?file=src%2FApp.tsx
Happy to report on GitHub if it really does seem like a bug, but I wanted to check that I wasn't doing anything silly in my own code first. Thanks!3 Replies
typical-coral•2y ago
I think you can open an issue
typical-coral•17mo ago
I've opened an issue: https://github.com/TanStack/query/issues/7275
GitHub
Solid Query: gets stuck in a loading state · Issue #7275 · TanStac...
Describe the bug Bug first reported by charlie on Discord. When typing into the input slowly everything works correctly, however spamming keys quickly can sometimes cause it to get stuck in a loadi...
wise-white•17mo ago
Hello! Yeah I just reworked the internals of createQuery that fixes a lot of these issues. If you update to v5.30.1+ It should fix the issues. Here it is working https://stackblitz.com/edit/solidjs-templates-xcihcy?file=package.json