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

eastern-cyan
eastern-cyan5/28/2025

Translating Routes

is it possible to translate the routes in filebased routing? I have a /search route which should be /suche when the user selects that he is german....
exotic-emerald
exotic-emerald5/28/2025

Native scroll by hash with hash router

Is there any intended way to have the native behavior of scrolling to a DOM element matching a given id in the URL hash, using TSR hash router? I need that for an Electron app, so I am forced not to use the standard default browser router, but I am open to any other solution which works in Electron. Thanks in advance ^_^...
conscious-sapphire
conscious-sapphire5/28/2025

How do stop pre-fetch ALL components?

When accessing http://localhost:3000/ and inspecting the network tab in dev tools, there are a lot of requests all the js file For example, ``` http://localhost:3000/js/components/category/CategoryView.jsx http://localhost:3000/js/components/cms/banner/routes.ts...
dependent-tan
dependent-tan5/27/2025

Buffer is not defined - from scroll restoration code

Hi, Im updating my TS Router version from 1.16.0 to latest and I'm running into the following issue: When I run my app, I get the following error: ``` jsesc.js:33 Uncaught ReferenceError: Buffer is not defined...
conscious-sapphire
conscious-sapphire5/27/2025

Restoring Search Params

We have a big data table that has filters that we drive from search params. We want to restore those search params any time the users returns to the default router. Example flow ...
optimistic-gold
optimistic-gold5/27/2025

Type issue in the search params of the Link component

Hello, I have a question about the search param type. The search param keys are inferred in <Link /> props, but the values are always "unknown." Is there a reason for this? Or did I do something wrong?
No description
ambitious-aqua
ambitious-aqua5/26/2025

Suspense around Outlets

I am using Apollo Client with Tanstack Router. I have wrapped an <Outlet /> in a <Suspense> and I am using useReadQuery to receive preloaded data from the loader I would assume this would trigger the Suspense fallback based on this line from the Apollo documenation The preload function returns a queryRef that is passed to useReadQuery to read the query data and suspend the component while loading. Here is my example code ...
wise-white
wise-white5/26/2025

Head data loading => What about streaming head data using deferred external data

Hello, I have a dynamic route to load a post, and I would like to know if it is possible to use data that is loaded in the loader to integrate them in the head? For example, I'd like to be able to define the title and canonical URLs in the head using dynamically loaded data. ...
harsh-harlequin
harsh-harlequin5/26/2025

Recommended way to deal with version skew

We have global state within our application, so when a new version is released, we don't want to perform a hard reload when navigated to a chunk that hasn't been loaded. One thought I had was to use the router.loadRouteChunk, iterating over every route when the page has loaded. Gets us the quick initial page loaded, but then guarantees the application has all the JS it needs...
exotic-emerald
exotic-emerald5/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>...
fair-rose
fair-rose5/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...
correct-apricot
correct-apricot5/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...
sensitive-blue
sensitive-blue5/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....
fascinating-indigo
fascinating-indigo5/24/2025

I dont understand route matching.

I have the following routes ``` fruits.tsx fruits.brazil.tsx...
rival-black
rival-black5/23/2025

Modifying the Router Context

How do i modify the router context in the component. Not in the beforeLoad() or loader().
quickest-silver
quickest-silver5/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...
continuing-cyan
continuing-cyan5/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({...
conscious-sapphire
conscious-sapphire5/23/2025

does tanstack router has api routes for backend codes?

i guess i have some issues during build