Unable to reliably await collection queryFn + data being "Ready"
I'm switching from tanstack query to db using query collections. I use tanstack router also, and my app was full of route loaders that would
It seems sometimes my route components render when a query result is an empty array, for just a quick flash, and then the results become available. I assume there is some solution for me in the docs, but the API reference for Collection gives a 404... so I have resorted to trying to read the source code and can't find an issue / the answer there. Maybe there is just a broken link for this Collection documentation? And it could be fixed? And then I would find the answer there?
tyia
await queryClient.ensureQueryData(...) (so my route will show a loading fallback until the promise resolves). It's a wonderful pattern and I am hoping to repeat it with tanstack db using await someCollection.preload() but am getting inconsistent results. It seems sometimes my route components render when a query result is an empty array, for just a quick flash, and then the results become available. I assume there is some solution for me in the docs, but the API reference for Collection gives a 404... so I have resorted to trying to read the source code and can't find an issue / the answer there. Maybe there is just a broken link for this Collection documentation? And it could be fixed? And then I would find the answer there?