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

fair-rose
fair-rose9/1/2025

Understanding onDynamic

When does onDynamic get called? In the examples that I’ve seen it looks almost the same as onChange. It says that it allows you to dynamically change what validator is used, but I can’t seem to figure out when it changes your validator to use the one written in onDynamic.
correct-apricot
correct-apricot9/1/2025

Does Start let one modify codeSplittingOptions in the router config?

Our app has > 100 routes and hundreds of components. It seems like the default behavior of Start's code-splitting leads to hundreds of requests during route loading. I'm curious to try different options or if they're intentionally not available then to try a recommended approach
stormy-gold
stormy-gold8/31/2025

how to get router in server function

I need build a typesafe url to be sended by email in a server function in a component I can use useRouter().buildLocation({ to: "/auth/sign-up/confirm" }).href; ...
evident-indigo
evident-indigo8/31/2025

SPA mode when deployed with SST

Has anyone used tanstack start in SPA mode when deployed in SST? I have tried to deploy with spa: { enabled: true } but the deployment hangs after Client and Server bundles for TanStack Start have been successfully built. Also I have tried to disable prerender but it is still attempting to prerender the shell...
old-apricot
old-apricot8/31/2025

AI SDK type instantiation possibly infinite

Hey there. I'm running tanstack start and the AI sdk. The issue I'm getting is Type instantiation is excessively deep and possibly infinite.. I'm getting this when attempting to return a UIMessage nor ModelMessage from a server function created by createServerFn. Could someone please help me to get this to work? Chat message persistence doesn't work without this https://tsplay.dev/Wk6kLm...
exotic-emerald
exotic-emerald8/30/2025

Question about loader / beforeLoading

So what do I do in this type of case : ``` /$id route.tsx <-- Need to fetch some data about related to the $id...
rival-black
rival-black8/30/2025

Does Start SSR run on BunnyCDN edge network?

I have little experience with either, but wondering if a Tanstack Start SSR app would run on BunnyCDN's magic containers, which uses Deno (version unsure)? I did not find any info regarding Deno in general in the docs, so I guess this will likely be problematic just for that reason? https://bunny.net/magic-containers/...
deep-jade
deep-jade8/30/2025

Google Indexing leads to 404

I deployed a start app but the routes dont seem to be indexed correctly. Could this be a configuration issue in my tanstack start app or is this something is have to figure out with google? I assume i have to tell google via Tanstack what the endpoints are. Does someone have the link to the docs page? I cannot find it...
No description
quickest-silver
quickest-silver8/30/2025

Installation within workspaces fails with bun

Found this odd thing. When I have tanstack start in e.g. package/frontend And other modules in packages/*. ...
other-emerald
other-emerald8/30/2025

How to combine client and server side data before page is rendered?

In a TanStack application, I have a SSR'd page where in the loader I'm gathering some records form a database (calling a server function, etc). When this page is called, let's say, with a curl (or a browser without JS, or a web crawler, etc) that's all the information that I need for this page, so everything works great. But when this page is first loaded in a web browser, I also need to load some data on the client (from a previously cached indexeddb database)....
constant-blue
constant-blue8/30/2025

Deployment at vercel not working (TS Start + Convex)

I'm trying to deploy an app on vercel with convex backend, better auth, and Tanstack Start. I followed all the rules (are just one) ```tsx...
No description
sensitive-blue
sensitive-blue8/29/2025

Solved: Hosting on Amplify

Hey everyone! I'm dipping my toes into a fresh TS Start app for my company in a monorepo made up of TS Router apps, all on Vite. We host on Amplify and each app gets a different subdomain. All the other apps build into a dist/ directory that Amplify knows to look for, and they all have an index.html file in the root which I imagine is the entrypoint for Amplify? TS Start builds an .output/ directory, which was my guess to point Amplify at, but I noticed that it doesn't have a root-level html file. I saw in another thread that someone suggested setting server: { preset: 'aws-amplify' }, but I'm unclear where to do this because my vite.config.ts file throws type errors anywhere I drop it. Happy to provide code samples if helpful! Has anyone here set up a monorepo with Amplify and made an app with Start? How'd you get everything hooked up?...
generous-apricot
generous-apricot8/29/2025

Styles for specific component loading after render

Hey there 👋 It seems that when I use a css stylesheet in a specific component, the styles are loading a short time after the initial page render, causing a flash of styling to moments after page load. This issue persists even when the stylesheet is imported in the route file only as opposed to the component file. When I move the styling to the global css file, it obviously works. Does stylesheet bundling not work on a per-route basis or per-component basis? ```tsx // biography.tsx import "./styles.css";...
extended-salmon
extended-salmon8/28/2025

getting rid of build warnings

How can i get rid of these?
No description
correct-apricot
correct-apricot8/28/2025

OpenTelemetry exporter, self-hosted

Where is the appropriate entrypoint for creating sdk.start() where sdk = new NodeSDK({...}) from @opentelemetry/sdk-node? It should ideally be invoked only once, on server start. I thought I could achieve this with a nitro plugin, but I did not manage to get it to run. I setup nitro.config.js (next to vite.config.js, so in the same directory where src/ lives, not in src/). I see that the config is called on startup (added a log in there). I tried creating server/plugins/foo.ts and src/server/plugins/foo.ts and registering it in the nitro config, but it never got called....
correct-apricot
correct-apricot8/28/2025

Vite PreTransform Error

I am running to the following error on latest when loading page:
[vite] (client) Pre-transform error: `super()` is only valid inside a class constructor of a subclass.
[vite] (client) Pre-transform error: `super()` is only valid inside a class constructor of a subclass.
...
constant-blue
constant-blue8/28/2025

define server function output type / validation?

How people doing that? Usually, when designing server side I prefer to decide id advance what types should be for what endpoints and then just implement the code according to that types. Doing it with createServerFn for now is like: ```ts interface MyResponse {...
correct-apricot
correct-apricot8/27/2025

How to access request headers in middleware?

I would like to reject certain requests based on the origin header. How can I access it in the middleware?
evident-indigo
evident-indigo8/27/2025

Tanstack Start with SST

Hey This question might be more relevant for the SST discord, but is anyone using tanstack start with sst/deployed in a lambda? I'm experiencing cold starts of up to 11 seconds which makes the application fairly unusable. A warmer has helped but the cold starts are still occurring occasionally. This is with a fairly small application as well. I am trying to work out what I've done wrong, I'm thinking about moving to ECS instead of deploying via a lambda....
exotic-emerald
exotic-emerald8/27/2025

`loaderData` always possibly undefined in the `head` ?

Hello, I see that from the types, the loaderData in the head of a route can always be undefined, but in my test it always returns the value of the loader ? Can we use the data or it can be possibly underfined thus useless ?...
No description