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-blush
distinguished-blush7/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)...
sensitive-blue
sensitive-blue7/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?
stormy-gold
stormy-gold7/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....
wise-white
wise-white7/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 } });...
sensitive-blue
sensitive-blue7/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?
afraid-scarlet
afraid-scarlet7/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. ...
metropolitan-bronze
metropolitan-bronze7/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. ...
flat-fuchsia
flat-fuchsia7/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)...
wise-white
wise-white7/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...
adverse-sapphire
adverse-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
adverse-sapphire
adverse-sapphire7/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' ...
other-emerald
other-emerald7/8/2025

Defaultssr -> false not working with tanstack start

getting empty screen while using defaultssr to false in tanstack start
stormy-gold
stormy-gold7/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...
useful-bronze
useful-bronze7/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?
helpful-purple
helpful-purple7/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?
absent-sapphire
absent-sapphire7/7/2025

Does my auth provider need to integrate directly with DB of choice or just Start in order to work?

This feels like a stupid question. I’m building an app with TanStack Start and want to use Convex as DB. Let’s say I’m planning on using auth ProviderX. Does the auth provider have to also integrate directly with Convex or does it only need to interact with TS Start? If a user is authenticated on an app level do they also need to be authenticated on a DB level to run queries that are a part of the page loaders? When I was playing with Remix/RR7 last year, the access to a DB, even for checking for valid users, was all based on page loaders, and then a DB query that just used a user/pass from the .env, not something that needed to check with the database on its own if it had permission to read/write. Live SSR vs Client side I guess? Does this question make sense?...
stormy-gold
stormy-gold7/7/2025

Docker image size with TanStack Start , pnpm

Hey folks 👋 I’m using TanStack Start with pnpm and Docker, and I’m noticing that my production Docker image is quite large 710 MB. Has anyone else experienced this? Is that size expected for a typical TanStack Start app, or might I be doing something wrong?
exotic-emerald
exotic-emerald7/6/2025

Not Having DELETE / PUT breaks integrations with existing RESTful APIs

Context: I have an SSR server and client using tanstack start. I can define server functions as either get / post. Right now these server functions essentially wrap another backend API. Problem Unless server functions can make fully restful requests (POST, PUT, DELETE, GET), then I cannot fully integrate with an existing restful API that utilizes those methods....
rival-black
rival-black7/6/2025

`node` property not available on event param in defineEventHandler

Using the latest version of TanStack Start (1.125.3), I am trying to work with the event from defineEventHandler, but there is no node property available, only request (while the H3Event<EventHandlerRequest> type has node defined as property), this looks like a bug or there seems to be a type mismatch. Does anyone know what happened?