TanStack

T

TanStack

TanStack is a community of passionate software engineers striving for high-quality, open-source software for web devs

Join

react-query-questions

solid-query-questions

table-questions

virtual-questions

router-questions

react-charts-questions

ranger-questions

vue-query-questions

svelte-query-questions

bling-questions

form-questions

angular-query-questions

start-questions

db-questions

start-showcase

router-showcase

📣-announcements

rival-black
rival-black5/26/2025

Passing premade link to Link component

I am using Tanstack Router in a repo with the backend containing some basic routes. Those routes are built in the backend and passed to the frontend, so I do not need to generate any more parameters or the like. However, I've run into an issue where trying to add it into a link like ```tsx <Link to={notification.link}>{/* ... */ }</Link>...
absent-sapphire
absent-sapphire5/25/2025

Build fails when I use a server function middleware with a server function

The middleware reads the user's data from a session cookie. From what I understand, the error is about me trying to run server-only code on the client side (like reading the encrypted session data), but I created my middleware using the server() method, so I'm confused. Reproduction...
like-gold
like-gold5/25/2025

useLocation re-renders before navigating status

Hi, is there any update on this issue? It’s causing my companie’s project a lot of noise in our monitors. https://github.com/TanStack/router/issues/3110...
metropolitan-bronze
metropolitan-bronze5/25/2025

Recreating the Tab-based navigation stacks from Ionic

Hi guys! Looking for some orientation here. I'd like to know whether it's possible to recreate the Ionic tab-based stacked navigation using Tanstack Router (https://ionicframework.com/docs/react/navigation) or not. If so, some ideas on how to do so? The idea is to replicate the native behaviour from iOS/Android....
metropolitan-bronze
metropolitan-bronze5/24/2025

I dont understand route matching.

I have the following routes ``` fruits.tsx fruits.brazil.tsx...
ambitious-aqua
ambitious-aqua5/23/2025

Modifying the Router Context

How do i modify the router context in the component. Not in the beforeLoad() or loader().
robust-apricot
robust-apricot5/23/2025

Hi all,

Is there a way to access the data loaded from parent/grandparent routes in a child page's loader method? My case is user is loaded at grandparent route, then projects at parent, then docs at child. In order to fetch the doc I need the user id and project id to do so, and this seems fairly difficult to get. I'm currently going down the router context path on sticking my user onto the context, but this feels unintuitive, as I would feel like all the data loaded in the chain should be available to...
correct-apricot
correct-apricot5/23/2025

Zod V4 fallback

Did anyone already tried Zod V4 with Tanstack router search params? I have this search params object ```ts export const GroupsRequest = GroupsFilters.extend({...
rising-crimson
rising-crimson5/23/2025

does tanstack router has api routes for backend codes?

i guess i have some issues during build
quickest-silver
quickest-silver5/22/2025

How to wait upper loaders

Is it possible for a sub-route loader to wait for the loaders in the upper trees? Ex: /users -> has loader...
fair-rose
fair-rose5/22/2025

What does color do in manifest link element in __root.tsx?

I have outlined color in the image.
No description
flat-fuchsia
flat-fuchsia5/22/2025

Preload only after a user has hovered for a set amount of time

Is it possible to make the preload until a user has hovered for a certain amount of time?
flat-fuchsia
flat-fuchsia5/22/2025

Get data before ANYTHING load

I am fetching data this way export const Route = createFileRoute("/snippets/$snippetId")({ loader: ({ context: { queryClient }, params: { snippetId } }) => { return queryClient.ensureQueryData(snippetQueryOption(snippetId)); },...
No description
xenial-black
xenial-black5/22/2025

Avoiding duplicate routing

Take the following routing example: posts/$postId posts/$postId/meta posts/$postId/settings posts/$postId/content...
rising-crimson
rising-crimson5/22/2025

what's the ts type for context?

export const Route = createFileRoute("/")({
loader: async ({ context }) => {
export const Route = createFileRoute("/")({
loader: async ({ context }) => {
...
sunny-green
sunny-green5/21/2025

Link on mousedown breaks view transitions on phones

I created this CustomLink component to be able to navigate instantly on mousedown, but it breaks view transitions on phones 👀 : ```ts import { createLink, type LinkComponent } from '@tanstack/react-router'; export const CustomLinkComponent = (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {...
conscious-sapphire
conscious-sapphire5/21/2025

how to add loading on change page

Hello, I would like to know how I can add a load until the page loads
automatic-azure
automatic-azure5/20/2025

Navigating while refetch is in progress results in cache not being used

I was wondering if the behavior I am observing is a bug, or if I am doing something wrong. When defining a loader with long loading time I see the stale data as expected when navigating to the route from another route. The navigation also correctly triggers the refetch of the stale data. Now when I navigate to another route after triggering the refetch without waiting for the refetch to be done, and navigating back to the route immediately, I don't get the stale data, but instead have to wait for the loader to be done....