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

national-gold
national-gold7/11/2025

Performance issue w/ `parsePathname` in `path.ts`

I tried to upgrade from 1.120.18 to 1.126.2. We had been stuck for a while on 1.120 because of the false positive "could not find match from" issue that got solved yesterday (https://github.com/TanStack/router/pull/4610). But in the CI for this upgrade, all our E2E were timing out. I tried it, it does feel very sluggish. It turns out that there seems to be a big performance regression in path.ts where the parsePathname function takes a lot of time (and is called a lot). Here's a performance trace from the chrome devtools on a staging build (not local dev, just to be sure I'm measuring something prod-like)....
No description
breakable-bronze
breakable-bronze7/10/2025

set defaultViewTransition to false when search params are updating.

I'm doing a search feature, but when I trigger the navigate (with new search params so), there is always the view transition (so my input is doing opacity 0 to 1 on each key..). I tried this but doesn't work : ```ts...
wise-white
wise-white7/10/2025

Clarification on behavior of `to=".."`

Not sure if this is mentioned in the docs, but just realized that for the to link option you can pass ".." , which I'm assuming means "one directory above" (in unix-y terms). Am I understanding that correctly? In this case, does that route get pushed to the history? i.e. similar to navigate({ to: '..' })
harsh-harlequin
harsh-harlequin7/10/2025

having a bug when hosting Tanstack Start on a VPS

I’ve got a TanStack project running on an AWS Lightsail VPS. The site loads fine when navigating around normally. However, when I reload a page that uses a route loader with an external API endpoint (instead of createServerFn), I get this error: ```bash Unable to connect. Is the computer able to access the URL?...
dependent-tan
dependent-tan7/10/2025

Duplicate Scripts loaded in Head

Raising a discord thread regarding: https://github.com/TanStack/router/issues/4585 When google SEO bot runs my website it is receiving 2 copies of the HEAD scripts. ...
sunny-green
sunny-green7/9/2025

Path param being transformed into invalid URL/URI part

Hello, Not sure if this is being caused by TanStack router but it is reproable by going to https://codesandbox.io/p/devbox/github/tanstack/router/tree/main/examples/react/start-basic?embed=1&theme=dark and going to either of these paths:...
extended-yellow
extended-yellow7/9/2025

Defer viewTransition until component can render without suspending

I don't know if this is supposed to work like this, but I thought the point of view transitions was to hide the loading state? I tried: ```typescript...
stuck-chocolate
stuck-chocolate7/9/2025

Initial entries in browser history

Is it possible/feasible to allow initialEntries in the createBrowserHistory function params? Same thing that already exists in createMemoryHistory. My use case is that we rely on useCanGoBack to display back buttons inside of the application, but a page reload causes the router to lose its internal history stack. I was wondering if I could create my own history tracker stored in sessionStorage that would populate the initialEntries, but it's not supported as an option right now....
ratty-blush
ratty-blush7/9/2025

breadcrumbs with `fullPath` type error

i have this component for breadcrumbs ```tsx function Breadcrumbs() { const breadcrumbs = useMatches().filter((match) => isMatch(match, "loaderData.crumb")).filter((match) => !!match.loaderData?.crumb); ...
ambitious-aqua
ambitious-aqua7/9/2025

SolidJS and TanStack Router Excessive Rendering Issue

When integrating SolidJS with TanStack Router, there are unexpected rendering behaviors affecting performance. Specifically, the home page renders multiple times on initial load, and enabling defaultPreload: 'intent' causes continuous re-renders when hovering over links. Issues Identified 1. Multiple Renders on Home Page Load: - The home page (/) renders at least four times upon initial navigation....
automatic-azure
automatic-azure7/7/2025

Parent route not set correctly?

I'm confused. Having ``` - Routes -- expeditions...
genetic-orange
genetic-orange7/6/2025

Why Does defaultPreload: 'intent' Fetch Data Again on Click?

Hello, I just wanted to ask if this is normal behavior with defaultPreload: 'intent'?. When I hover over a link, it preloads the routes, which is the expected behavior. However, when I click the link, it still fetches/loads the route data again. Please check the attached video for a demonstration.
adverse-sapphire
adverse-sapphire7/5/2025

Router + Query + Suspense + Deferred data

Hello, I have a question about using Router + Query + Suspense + deferred data preload So I want to have a page with a critical data + deferred data (preferrably, multiple ones) while using Tanstack Query. It seems like the flow should be something like that:...
adverse-sapphire
adverse-sapphire7/5/2025

how to get params strict: false inside beforeLoad and loader?

I need to check in a parent route child params
ratty-blush
ratty-blush7/4/2025

relative navigation with dynamic source route?

I have a utility that makes the concept of a "Search Route" which basically allows things like modals or other widgets to be tied to a search param. I have this following function i use to either open or close the route. the goal is basically i want the router to preserve it's current page, but i just want to modify the search params: ```ts function go(k: string, v?: unknown) {...
other-emerald
other-emerald7/4/2025

How to emulate Next.js app router constraints

Unlike probably most people here, I like next's directory-based routing model and hate remix's file-based routing mode, whether with flat-routes or not Unfortunately I don't like the rest of Next, so I was wondering if there's any way to emulate its routing using tanstack router's router settings. Basically what I want is: ``` 📁 src/routes/...
other-emerald
other-emerald7/4/2025

How to do non-nested routes with virtual file routes?

The documentation teaches how to make non-nested routes using the file/folder names, but there is no instruction to do the same using virtual file routes I thought that only the children of a route declared in the first parameter were considered nested, but sibling routes with the same path are still considered children These two work the same: ```js export const routes = rootRoute("__root.tsx", [...
passive-yellow
passive-yellow7/4/2025

Migrating to tanstack Start

Hi all, Last Monday we launched our SPA with tanstack router + all tanstack suite to prod. We faced SEO issues, basically our SPA is an empty blank page for google crawlers for all the pages. I've tried for 5 days improve the performance etc, nothing works. I think this is because it's highly coupled to our headless CMS. These are the "crazy things" we do in our SPA fetching data from our CMS - We fetch feature flags to turn on/off some features. - We fetch seo meta data for each page to inject it in the header of the document ...
metropolitan-bronze
metropolitan-bronze7/3/2025

How do I get context set in root route?

```js interface RouterContext { player?: ReturnType<typeof usePlayer> } ...
flat-fuchsia
flat-fuchsia7/3/2025

Breadcrumbs with async loaders in between

I have a following folder structure: ``` routes/ $lang/ _layout/...