Loader is so slow
My query is already cached and adding a console.time before and after the query shows 0.17ms, but the loader causes the page to be white for 1s for loading the page. Removing the loader loads the page instantly. Why?
10 Replies
rare-sapphire•16mo ago
can you please provide a complete minimal example by forking one of the existing examples on stackblitz?
quickest-silverOP•16mo ago
@Manuel Schiller
rare-sapphire•16mo ago
that's not a complete minimal example
I cannot run this
rare-sapphire•16mo ago
please go to https://tanstack.com/router/latest/docs/framework/react/examples/basic-file-based
pick one of the examples on the left side
React TanStack Router Basic File Based Example | TanStack Router Docs
An example showing how to implement Basic File Based in React using TanStack Router.
rare-sapphire•16mo ago
then fork that on stackblitz, modify to reproduce your issue and then post the stackblitz link here
quickest-silverOP•16mo ago
quickest-silverOP•16mo ago
This proves that it's the loader @Manuel Schiller
environmental-rose•16mo ago
We need a way to debug it.
Provide something we can run or it won’t get fixed. Because we can’t know how to fix it.
Any fix I give you right now would just be a terrible guess.
quickest-silverOP•16mo ago
Bruh it was the devtools... Well that was a lot of time wasted
Another issue, the pendingComponent is shown no matter the
defaultPendingMs
Might be related to react rc? Does tanstack router support react 19?
nope thats not it
Setting defaultPendingMinMs to 0 fixes the issue.quickest-silverOP•16mo ago
I didn't do anything wrong. The issue is with the library. Here is an issue about it, to which I commented a temporary solution https://github.com/TanStack/router/issues/2183@Tanner Linsley @Manuel Schiller
GitHub
Issues · TanStack/router
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - Issues · TanStack/router