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

distinguished-silver
distinguished-silver6/25/2025

h3 `getValidatedQuery` not working after devinxi?

I'm about to create a repro when I have some time but I was wondering: is getValidatedQuery (to parse query params), which is now apparently from h3 supposed to work the same as vinxi's one? I'm on: ``` "@tanstack/react-router": "1.121.34",...
conscious-sapphire
conscious-sapphire6/25/2025

React Fluent Icons not being loaded/throwing an error

Hi all, I'm currently migrating from Next.js to Tanstack Start. I have fully completed the migration, and changed all of my routes, per the doc for the migration. I'm sure there is still a lot of work to do (fixing small bugs, rewriting my server actions, etc) but I can't even get there because of a very puzzling error: ```An error occured while server rendering /index.html:...
distinguished-silver
distinguished-silver6/25/2025

How to install Tailwind with vite and @tailwindcss/vite?

Is there a guide on how to install Tailwind with TSS (latest version)?
distinguished-silver
distinguished-silver6/25/2025

Unclear migration guide for 1.121.10

Hi I'm following this guide: https://github.com/TanStack/router/discussions/2863 But in the last section it's unclear where createServerFileRoute should be imported from....
No description
ambitious-aqua
ambitious-aqua6/25/2025

Returning in middleware

Hi, I'm just getting started with TanStack Start. Right now I'm trying to do something like: ```ts export const authMiddleware = createMiddleware({ type: 'function' }).server(async ({ next }) => { const h = getHeaders();...
foreign-sapphire
foreign-sapphire6/25/2025

Fix TanstackFrom after migration from `Router` to `Start`

Hey! I updated my app to use Start instead of router, but my forms work anymore. Before I would post to my Hono backend (different port) using orpc, I expect the same to happen right now ```tsx function RouteComponent() {...
ambitious-aqua
ambitious-aqua6/25/2025

Encoded URL params cause redirect loop on page refresh

Is this suppose to happen? When using encoded parameters in routes, client-side navigation works fine, but hard refresh/page reload causes ERR_TOO_MANY_REDIRECTS. Reproduction steps:...
fascinating-indigo
fascinating-indigo6/24/2025

Unable to access middleware before initialization

Hello I am trying to launch on vercel but i keep getting an issue using the latest version of tanstack I'm using router and tanstack start for server functionality and i keep getting the following error: [request error] [unhandled] [GET] https://tanstack-ume-ume-gih3m7v73-ume-projects.vercel.app/...
wise-white
wise-white6/24/2025

Dynamic environment variables but otherwise CSR

I searched around a bit and read the docs but didn't quite graps things I suppose. Using Router / Start, could we achieve behavior such that: we have dynamic runtime environment variables that are then also provided to the client, but otherwise completely opt out of any server-side rendering logic (and run loaders etc. only on the client). So the only SSR parts would be providing the proper runtime environment data (like an API endpoint, Sentry DSN etc.). This way we would have one build for all environments, but still stick to being almost completely CSR. We currently use Next.js for our management dashboard but we don't need any of the Next.js functionality at all, and would much benefit from just having dynamic environment variables for things that need to be dynamic / set on boot, and otherwise be solely reliant on CSR + having the option of having API routes etc. if need be later (if we don't want to bloat our separate API for a one-and-done thing). I guess this would also fit as a #router-questions , but oh well. :D...
inland-turquoise
inland-turquoise6/24/2025

Vite 7.0.0

Vite 7.0.0 is now released, however - is it safe for us to upgrade to this package? I did upgrade and noticed some errors for vite.config.ts - so just wondering if i maybe should bump down version instead. https://github.com/vitejs/vite/blob/v7.0.0/packages/vite/CHANGELOG.md...
jolly-crimson
jolly-crimson6/24/2025

Vite continuous reloading

I'm using Vite 6.3.5. I keep getting optimize dependencies like below on each navigation, causing the app to reload. I tried disabling optimize dependencies (optimizeDeps.disabled=true) but it seems to prevent Clerk from loading. Is there another approach? I imagine I could exclude all third party npm packages (optimizeDeps.exclude), but it is quite a list....
deep-jade
deep-jade6/24/2025

Monorepo + Cloudflare workers

Hey all! Looking to bounce some ideas and possibly guidence on how to make the setup in title work. We run and NX monorepo and want to host on cloudflare workers. Running into some config issues. We could not find any documentation about the config options for the tanstackStart vite plugin and all previous examples refer to an app.config.ts file, which seems irrelevant?...
other-emerald
other-emerald6/24/2025

Is it expected during development invoking a POST server function to cause a full page refresh?

This does not happen when I start the application in preview mode i.e vite start
conscious-sapphire
conscious-sapphire6/24/2025

What's the best way to have server only utility functions?

I recently had a code splitting issue, i tried refactoring some duplicated code into utility functions and the build started failing. Is there a way to mark a function as server only? I intend these functions to be used by multiple server fns
continuing-cyan
continuing-cyan6/24/2025

What is the best way to fetch bootstrap data?

I want to fetch some bootstrap data when a user first loads the app. This data includes feature flags and the list of workspaces of the user and their preferences, etc... From my understanding of the framework so far, there are multiple ways of doing this: - Using TanStack Query (or some other library) with client-side caching: However, I would ideally like this to be done on the server-side instead, and preferably just by using the primitives of the router. - Using beforeLoad with staleTime set to Infinity: This forces me to use a pathless layout specifically for the data that I want to cache, additionally it makes it run twice: once on the server and once on the client, which is not ideal (ideally this would be ran only once, on the server)....
rising-crimson
rising-crimson6/23/2025

Deploying built assets to CDN/S3

I run a pretty big site and we're slowly implementing TanStack Start on it. We have around 8 web boxes in a load balancer, and the way we typically handle deploys is we build the the app on every one of those boxes, and have a copy of client-side assets/modules on S3. This allows us to properly leverage Cloudflare caching and whatnot for the user, while still allowing all server-side JS to run on the box properly....
harsh-harlequin
harsh-harlequin6/23/2025

Clerk redirect generating undefined route params after sign-in.$

Hey folks, I'm trying to get
"@clerk/tanstack-react-start": "^0.17.0",
"@clerk/tanstack-react-start": "^0.17.0",
working, but so far I'm having issues with the redirect feature. I'm unable to get it to redirect back to the original route after a successful sign-in. Does anyone have a good example of this feature working?...
harsh-harlequin
harsh-harlequin6/23/2025

Cannot `router.navigate` to a AnyRedirect?

Before the devinxi I was able to do the following: ```tsx if (isRedirect(data)) {...
rare-sapphire
rare-sapphire6/22/2025

Script on server start

after the devinxi-ing of TSStart, is there a way to run something on server start up ? typically a migration (drizzle)
extended-salmon
extended-salmon6/22/2025

typescript error for dynamic route

Hello, I am using this Link component that goes to a dynamic route: /dashboard/transactions/$transactionId where a transactionId is passed in using interpolation, see the image below. Typescript is giving me an error in Webstorm where I really think it should work just fine. Anyone know what's going on here and/or how to resolve this?...
No description