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

genetic-orange
genetic-orange7/12/2025

@vitejs/plugin-react-oxc with the react compiler?

Hello, does anyone know if I can activate the new react compiler with @vitejs/plugin-react-oxc?
deep-jade
deep-jade7/12/2025

Can I call createServerFn inside another function or does it have to be used in module scope?

Title! This is regarding a helper function I’d like to make. But I understand the compile process probably means it has to be used only at top level. Thanks
adverse-sapphire
adverse-sapphire7/12/2025

Clerk's getToken({template: "convex"}) add significant delay to page load

Hello. I'm trying to use Convex in an app built with TanStack Start + Clerk. I followed the documentation and examples, and everything seems to work, but now navigating to pages takes too long. After debugging a bit, I found out that the delay on page loading is being introduced by the call to get the token from Clerk. I'm talking about the const token = await auth.getToken({ template: 'convex' }) in the following code: ```ts...
eager-peach
eager-peach7/12/2025

Is there an easy way via CLI to upgrade tanstack start?

Would be awesome if there was a way to do it via CLI. Otherwise i was thinking just updating the versions for @tanstack/react-start and @tanstack/react-router in package.json.
stormy-gold
stormy-gold7/11/2025

Hydration Issue causes Duplicate HEAD Script

See: https://github.com/TanStack/router/issues/4585 I don’t have a shareable example, I can try to reproduce into an isolated repo over the weekend, however. What is happening: SSR is filling in LD-JSON data in the HEAD of my page route with SEO specific metadata for Google to render with the results (e.g a star review rating for the page)...
grumpy-cyan
grumpy-cyan7/11/2025

Initialize root router context from hook?

How do I initialize the root router context with a value from a hook? Is there any other way to take a value from a hook (which requires a context wrapper) and use it in the router context?
graceful-blue
graceful-blue7/11/2025

Better Auth, Start and protected routes

Hey 👋 I'm setting up authentication with Better Auth and TanStack Start. I’ve got it working, but the solution feels messy, lots of duplicated code. Does anyone have a clean example or template to share? Ideally with good practices like global middleware for protected routes and user object available via context, etc....
quickest-silver
quickest-silver7/11/2025

Does updating searchParams is diffrent in version of TS Start?

``` const debouncedSearch = useMemo( () => debounce((value: string) => { navigate({ to: '.', search: { page: 1, filter: value } });...
grumpy-cyan
grumpy-cyan7/11/2025

Setting request headers

Hi, how do I set the request headers so that I can pass an Authorization token in requests to server functions?
unwilling-turquoise
unwilling-turquoise7/11/2025

Setup retries for SSR/CSR

Some facts: - All my api calls are GET to pull data from my CMS. We don't invalidate/refetch. The staleTime is Infinity. If user wants to get "fresher" data they need to reload the page, easy. - We use ky and tanstack query. - In our current app, ky is setup as retry FALSE, and queryClient retries as 3. ...
adverse-sapphire
adverse-sapphire7/10/2025

Where should I put supabase.auth.onAuthStateChange?

Hi, I'm trying to implement supabase.auth.onAuthStateChange into the client since supabase does not recommend using getSession() in the BE and getUser() does not include the custom claims in the token. To implement the subscription, is there any recommended pattern? Right now I can think of 1) Using React Context - I already implemented this for ThemeProvider (shadcn). Then I wrapped the context around children in RootDocument. ...
harsh-harlequin
harsh-harlequin7/10/2025

Does static pre-rendering work for dynamic routes?

Hey all! Couple feasibility questions here: 1. Does pre-rendering work on dynamic routes which require data loading? I’m coming from Astro where we have getStaticPaths(). 2. Do the exported static routes retain beforeLoad functionality? (Auth checks, etc)...
robust-apricot
robust-apricot7/9/2025

How to test changes in tanstack forked repo locally

Guys, whats the best way to test changes in tanstack repositories locally in yours projects? I mean: I have a project A started with tanstack-start...
foreign-sapphire
foreign-sapphire7/9/2025

How to use Static Prerendering + SPA

I am working on a web app and it has some public pages that I want to prerender (like home page, terms & privacy policy, login page), and private pages that the user must login to access that I want to render as a SPA basically: ----------------------- | /index | | /login |___ Static Prerendering...
No description
other-emerald
other-emerald7/9/2025

Questions about the role of backend (Hono)

I saw that the tanstack start project uses Hono Backend. However, I think that if you use Server Route or Server Function, you don't need a separate Backend, so why use a backend like hono?
genetic-orange
genetic-orange7/8/2025

streamEvents example

Hello guys! I was trying to follow the example from here: https://tanstack.com/start/latest/docs/framework/react/server-functions ```ts import { createServerFn } from '@tanstack/react-start' ...
mere-teal
mere-teal7/8/2025

Defaultssr -> false not working with tanstack start

getting empty screen while using defaultssr to false in tanstack start
adverse-sapphire
adverse-sapphire7/8/2025

TanStack Start production build generates 404s for all static assets (JS/CSS)

JS/CSS isn't being served in my production builds - I'm sure i'm missing config somewhere. Any thoughts?
Request from ::1: GET /site.webmanifest/index.html
Environment...
old-apricot
old-apricot7/8/2025

Link `to` urls can't be external but `href` still requires `to`

Using the start-bare example I am not able to use <Link to="http://...">External</Link because it matches no routes but using href instead I see a complaint about missing to. Did this change and is there a proper way to link to external urls?
afraid-scarlet
afraid-scarlet7/7/2025

How can I opt out of global middleware?

I have a server function that shouldn't run one of the global middlewares I've registered. Is there a way to opt out from that middleware?