T
TanStack•3w ago
rare-sapphire

What is the tanstack way of doing loading? (Example: Next.js has loading.tsx)

Is there a way i can add a loader to a specific road that does server-side loader?
4 Replies
national-gold
national-gold•3w ago
are you looking for deferred loading? you can use Await or just React.use. this will suspend your route component and then should cause the pending component to be rendered
rare-sapphire
rare-sapphireOP•3w ago
aha thanks! 😄 Yeah, deferred loading 🙂
rising-crimson
rising-crimson•3w ago
RouteOptions type | TanStack Router React Docs
The RouteOptions type is used to describe the options that can be used when creating a route. RouteOptions properties The RouteOptions type accepts an object with the following properties: getParentRo...
rising-crimson
rising-crimson•3w ago
And useSuspenseQuery should use it properly too

Did you find this page helpful?