TanStackT
TanStack3mo ago
10 replies
spontaneous-moccasin

How to access isLoading when using Start+Query in spa mode

Hi guys I need to build a app with Tanstack start & query, the app should have a good experience when using spa mode because maybe I didn't have enough resources to deploy a ssr server.
I tried to read the doc https://tanstack.com/router/latest/docs/integrations/query , and I think I need to run the fetch function in route's loader function and return the data. That will be ok if using ssr mode, since the fetch will run on server and then response the rendered page, but when using in spa mode, we can only get a blank page if the loader is not finish, so can we for example access
isLoading
so that we can create a skeleton when the data fetch is not finished?
[!IMPORTANT] This integration automates SSR dehydration/hydration and streaming between TanStack Router and TanStack Query. If you haven't read the standard guide, start there. What you get Automatic...
Was this page helpful?