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-black9/22/2025

Tanstack Router + oauth2-proxy

Has anyone integrated oauth2-proxy with router? I need to integrate Keycloak on the day-job and a provided mechanism is an oauth2-proxy sidecar Currently hitting my frontend URL/oauth2 Tanstack picks up the response.. I’d imagine I need to allow the proxy to go through?...
conscious-sapphire
conscious-sapphire9/22/2025

Optional search params with redirect calls

I've noticed that if I add a validateSearch option to my route, all calls to redirect({ to: "/whatever-route" }) now requires a search param (at least for typescript checks to pass). Is there a way to make this search field actually optional? See example reproduction: https://stackblitz.com/edit/tanstack-router-f3awwzqj?file=src%2Froutes%2Fold-about.tsx This might be a bug, just wanted to validate before logging. Also ignore the overly simplistic validateSearch but it should be sufficient to prove the issue....
environmental-rose
environmental-rose9/22/2025

Best place to hide splash screen in SPA

Hi 👋🏻 I'm building a SPA where we have a so called splash screen that is shown while the JS bundle is being downloaded > app rendered > auth status checked > and finally initial data loaded. So my question is what is the best place to hide this splash screen (by calling our hideSplashScreen method)? We are using Suspense to load data with Apollo Client and we have a pending spinner component configured for routes that is shown after the initial load on subsequent navigations. My goal is to a...
helpful-purple
helpful-purple9/20/2025

Tanstack Start post css layer base error

Hi, im having this error when using "npx create-start-app@latest", no name provided so I can select the options that the cli gives to you... I selected shadcn, query and table... Im working on a windows machine , no docker provided. Would like some help please, have a nice weekend...
No description
clever-tan
clever-tan9/19/2025

CSS not being injected while SSR when component is loaded via <Suspense />

I am not sure if this is expected or a bug or if I am doing something wrong. Basically I am loading a component via Reacts lazy Suspense and the component gets rendered on the server fine (it's content is in the HTML when requested via cURL for example) but the corresponding CSS File is not injected in the head which causes a flicker because the css loads only after the JS is hydrated and requests the css. Repro URL: https://tanstack-suspense-css-flicker.vercel.app/ (Title, Subline + Button flash on the top right and only then move to the center when CSS is hydrated) Repro Repo: https://github.com/dunklesToast/tanstack-suspense-css-flicker Expected result (without Suspense): https://tanstack-suspense-css-flicker.vercel.app/no-suspense...
deep-jade
deep-jade9/19/2025

What is the cleanest way to pass route parameters to component files?

I couldn't find a clear-cut example within the documentation on how you handle it when your components live in components files and your routes live under the routes path. I want to use things like use params but I don't know how to get to them without using it directly within the route file. I've thought of two ways to do it and I'm not sure which one's better. Let me know which one is the preferred pattern if there is one. Pattern 1 Determine params in the Route file and pass as props to component. ```jsx...
robust-apricot
robust-apricot9/18/2025

Question on route path

Hey guys! Thanks for the great libraries shipped! I have a question regarding paths for the file base routing. I want to have shallow paths for authenticated users, for example: /dashboard, /settings and so on. I've created a route.tsx file that catches all of this inside of the (organization) group, but this is also catching the route in the landing page. How do I sort this problem out? The route.tsx file, has the layout of the authenticated paths....
eager-peach
eager-peach9/18/2025

How to get a type with all searchParams?The same type returned by useSearch({strict: false})

I want to type a prop as the union of all searchParams keys How to get a type with all searchParams? The same type returned by useSearch({strict: false})...
eager-peach
eager-peach9/18/2025

wrapping navigate (with types)

i'd like to build a wrapper function for navigate . is there a guide on how to do? especially type wise, it doesn't look easy.
plain-purple
plain-purple9/17/2025

Using the router-ssr-query-core in Solid

So i tried to use the @tanstack/router-ssr-query-core package in my Tanstack Start app @tanstack/solid-router, but it Seems to have just bricked my whole app. I keep geting Errors like this ``` Warning: useRouter must be used inside a <RouterProvider> component! Warning: useRouter must be used inside a <RouterProvider> component! Warning: useRouter must be used inside a <RouterProvider> component!...
helpful-purple
helpful-purple9/17/2025

Loader data from pathless layout

Is it possible to access a route’s loader data from a parent pathless layout? I need to render a common layout component which needs part of the data loaded by all the child routes loaders (I cannot split the fetch or repeat it in the layout route loader too). I tried using the unbounded global “useLoaderData({strict: false})” but it always returns undefined. My other way would be to use a global state manager but I’d like to try in a more idiomatic way first....
conscious-sapphire
conscious-sapphire9/16/2025

Is there a away to build a dynamic route tree at runtime

I have a situation where my route tree depends on some runtime parameters (determined by backend). I'm trying to see if I can combine the file based routing system with code based routing but at runtime. Has anyone done something like this?
unwilling-turquoise
unwilling-turquoise9/16/2025

đź’ˇ Need Help with TanStack Router Layouts

Hey everyone 👋 I’m working on a React project with TypeScript and TanStack Router, and I’m a bit stuck with creating two different layouts. 👉 Here’s the setup I want:...
afraid-scarlet
afraid-scarlet9/16/2025

Is it possible to render a route within a routes <Outlet />?

I have an inbox component, on the left side i have a list of notifications wich is inside a layout. And then on the right side there is a <Outlet /> component. Clicking on one of the notifications should ideally take me to a /issue/id page - but instead of doing that, can i instead render that /issue/id page on the right side of my layout where the <Outlet/> component is? Thanks for help....
No description
useful-bronze
useful-bronze9/15/2025

Validation path params

Will we have validation params like search params in the future, so we don’t need to use beforeLoad? Parsing params is fine, but unlike search validation, it shouldn’t be applied to the URL
helpful-purple
helpful-purple9/15/2025

Behaviour of retainSearchParams & stripSearchParams not what expected.

When using both retainSearchParams and stripSearchParams together, the default values are no longer stripped, and then its is not possible to navigate back to the default values after navigating away. Is this the expected behaviour or a bug? For example the params in the url look like this by default gallery?tag=all&sort=popularity&page=1...
fascinating-indigo
fascinating-indigo9/13/2025

Router context not defined by provider during loader/beforeLoad?

I'm setting up my router and wrapping my providers with Wrap: ```export const createRouter = () => { const router = createTanStackRouter({ routeTree, scrollRestoration: true,...
extended-salmon
extended-salmon9/13/2025

Navlink redirecting to respective routes (url changes) but UI not updating

See on clicking cards (highlighted in green), they redirecting to respective routes as path (highlighted in red color) getting change. But corresponding note data is not loading automatically, instead if i reload the screen then the data get updated. Can anyone help me to rectify this?...
No description
vicious-gold
vicious-gold9/13/2025

Tanstack Start Question

I have a question related to tanstack start, My initial call in the __root route beforeLoad is to basically get the config from backend. After that I wanna use that config to setup few clients like authClient and apiClient both of these use baseUrl from config. the issue is I am getting error while initializing these clients in beforeLoad due to ssr since these are not serializable. Ideally I wanna put them in context so that we can use it throughout our application....
extended-yellow
extended-yellow9/12/2025

Release flow details

Hey guys, 🙂 I noticed that version v1.132.0 of TanStack Router is currently released with the alpha postfix. This version contains some changes I’m really looking forward to using in our enterprise application. Do you have any plans or timeline for when this version might get a stable release (without the alpha tag)?...