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

harsh-harlequin
harsh-harlequin9/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
flat-fuchsia
flat-fuchsia9/15/2025

`getCSSRecursively` call stack size exceeded

hi! i have run into this when trying different manualChunks configurations. i was able to reproduce it in this repo https://github.com/kevinehosford/start-basic-overflow/blob/main/vite.config.ts. the example is not really my intended configuration but just shows how it can happen. i'm wondering, is this a bug or just naive config?...
No description
exotic-emerald
exotic-emerald9/15/2025

Better-Auth with Tanstack Start + Tanstack Query

I have successfully refactored the better-auth nextjs demo to tanstack start https://github.com/better-auth/better-auth/tree/canary/demo/nextjs But I have a question: ...
helpful-purple
helpful-purple9/13/2025

Css loading problem

Hey, guys I`m having some problem bundling my tanstack starter build Build completes successfully but showing the following warning:...
wee-sapphire
wee-sapphire9/13/2025

Middleware global logging examples

Hello! I was wondering if anybody has managed to produce reasonable logging for tanstack/start on the server? I cannot find any examples of logging request/response and the details of it. request is always undefined (data coming in) and response is mostly just the serverFN response if there is one. ```javascript import { createMiddleware,...
extended-salmon
extended-salmon9/12/2025

Error Deploying to Cloudflare

I have this error when trying to deploy to cloudflare ``` error during build: SyntaxError: Unexpected token: keyword (default)...
flat-fuchsia
flat-fuchsia9/12/2025

Hydration error from dynamic asset link rendering SPA shell

hi! i'm wondering about this hydration error. I can see that all of my requests are being served the spa shell that was prerendered. when a deeper route loads as the landing page there's an asset link mismatch. i see a hydration error but do see suppressHydrationWarning just not on all of the links. i'm wondering if i'm not configuring things correctly. thanks! ```...
rare-sapphire
rare-sapphire9/12/2025

Flash of wrong theme when deployed to Cloudflare Workers

I have a TanStack Start web app with theming applied using next-themes and when deployed to Vercel or to a VPS using Docker, the themes work correctly. However, when I deploy to Cloudflare workers and the selected theme is the dark theme, whenever I reload the page, there's a flash of the light theme, before the dark theme loads in. What am I doing wrong? Any idea how I can fix this? ```tsx function RootDocument({ children }: Readonly<{ children: ReactNode }>) { return ( <html lang="en" suppressHydrationWarning>...
flat-fuchsia
flat-fuchsia9/12/2025

Page not starting on scroll position top

Hello, when I scroll on my /post route and navigate to /post/$postId, it doesn't reset the scroll position. Anyone has an idea why so?
correct-apricot
correct-apricot9/12/2025

Where is the documentation for the Tanstack Start Vite plugin?

Looking for the API documentation for the vite plugin: @tanstack/react-start/plugin/vite I'm currently configuring it like the following but unsure if that is correct: ``` ...
national-gold
national-gold9/12/2025

server side context?

I am trying to implement pocketbase auth and currently I do: ```ts export const authenticate = createServerFn().handler(async () => { pb.authStore.loadFromCookie(getCookie(cookieName) || ''); ...
sensitive-blue
sensitive-blue9/11/2025

oauth with atproto (Bluesky?)

Hi! First time trying tanstack-start. I am trying to implement the at-proto oauth flow with Better-Auth. However, getting into issues big time. First of all, i came across with this post: https://www.armannotes.com/posts/implementing-bluesky-oauth-authentication-in-nextjs-betterauth Its quite incomplete, and was written for NextJS, but still looked like a good starting point. I guess my main pain point is how to handle the BlueskyOAuthClient, on the server, and the cookies, but since I am not familiar with tanstack-start yet, I am probably doing multiple things wrong. Here`s what I have so far:...
flat-fuchsia
flat-fuchsia9/11/2025

Guidance on SPA mode with `preset:'node-server'` rewrites (like for Netlify)

Hi! I'm wondering if there's a proper way to configure the 404 -> _shell redirect when building with the node-server preset. The use case would be to mimic the production setup locally (cdn with server for functions)
fair-rose
fair-rose9/11/2025

Supabase Server + Browser Client Best Practice - When to do loader + serverFn vs client useQueries

I'm using supabase with both the browser and server clients. Using tanstack query to run functions has gotten a bit confusing due to the shared responsibilities when 1. Using loader function to ensure the query data is there (lets say a Contact object with id 1). To do this i must have the query options somewhere with the correct key and queryFn But doesn't this queryFn needs to be a serverFn / call a serverFn due to loader running on the server (at least initially) and not having access to the browser supabase client...
flat-fuchsia
flat-fuchsia9/11/2025

Server Functions

Hello, what is the best practice to initialize classes in server files with secret keys? Can I just initialize them outside the server functions or should I always do it inside it? Right now I'm doing it like so: ...
equal-jade
equal-jade9/10/2025

Is there a way to get beforeLoad to run on the client? I have tried enabling SPA mode

I feel like there's some config I'm missing somewhere. No matter what I've tried, any console log prints in my dev server, not in the browser console. Should I drop Start and just use Query + Router?
robust-apricot
robust-apricot9/10/2025

Hi, I think I was using useServerFn the right way, but it won't redirect... Pls advise

```jsx export const loginFn = createServerFn({ method: "POST", }) .validator((data: FormData) => {...
harsh-harlequin
harsh-harlequin9/10/2025

How to use persistQueryClient in Tanstack Start

Hi, I have been trying to find documentation on using the persistQueryClient in my Tanstack React Start App, but so far have not been able to get it working For example, consider the Basic + React Query example at https://tanstack.com/start/latest/docs/framework/react/examples/start-basic-react-query ```tsx...
wise-white
wise-white9/9/2025

Can I use TanstackDB for a *very simple* news feed app?

Hi, I'm thinking about a simple weekend project. Just one page with a list of news filtered from RSS feeds. I'll have a typical web framework on a backend, putting data in a table called posts, which then would be available through a JSON API endpoint with infinite pagination. ...
exotic-emerald
exotic-emerald9/9/2025

Vercel Crons is not working

Hello ! I don't know if it's a bug, but I don't even find the solution. I use Vercel for my Tanstack Start app. It works great, but if I add a cron job (with https://vercel.com/docs/cron-jobs/quickstart?framework=other), all of my routes api of the tanstack start (build step) are just broken (all 404). Like better auth is not working if I have just a api/hello.ts at the root of my project and deployed on Vercel. It works great on local (with build/start steps)....
No description