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

generous-apricot
generous-apricot10/17/2025

Server Fn error return types

Hello! In createServerFn functions, should we return normal typescript errors (ie. Error object) or http errors like return new Response('Internal Server Error', { status: 500 }) ? Thanks!...
conscious-sapphire
conscious-sapphire10/17/2025

What's the best place to initialise a server-side locale translator function?

I'm using use-intl for my i18n (which is the core library from next-intl. I want to initialise the translator function and inject it into the request context so I can use it in the backend, but have it load the necessary data from user preferences only once. ``` export const Route = createRootRouteWithContext<MyRouterContext>()({ beforeLoad: async ({ context }) => {...
flat-fuchsia
flat-fuchsia10/17/2025

Sitemap is hanging

When running vite build --mode production everything works very nicely up until the point where the sitemap is generated. At that point, it just hangs indefinitely. ``` [sitemap] Building Sitemap... [sitemap] Writing sitemap XML at dist/client/sitemap.xml...
genetic-orange
genetic-orange10/17/2025

Updating search params with `navigate({ search: ... })` causes sluggish UX

Search params navigation feels like full page reload Issue Using navigate({ search: ... }) to update search params causes sluggish UX (~300-500ms delay). Using TanStack Start + Convex. ...
sensitive-blue
sensitive-blue10/17/2025

error component not receiving the error on page change

Hi, I'm trying to contribute to the docs by moving the start react supabase example to solidjs but I ran into some bug. Essentially during page transition, the error prop isn't being passed to the error component, but on refresh it works. so what this means is that going to /posts from / doesn't correctly redirect but hard refreshing /posts works. anyone that can take a look? the error component is running, but its not being passed in the error prop which it needs in order to check the type of error. on going from / to /posts, gives this error in browser ...
other-emerald
other-emerald10/17/2025

how are people creating / accessing a query collection when used in conjunction with tanstack start?

how are people creating / accessing a query collection when used in conjunction with tanstack start? the docs make it seem like we should create the collection alongside the queryClient. The queryClient is created in the getRouter function in the tanstack query example, so are you also creating the collection in the getRouter function and then accessing through router context?
continuing-cyan
continuing-cyan10/16/2025

2nd css link tag added on client

got this really weird behaviour when deploying my tanstack app (doesn't happen locally): page source includes 1 link tag for my css, but when I inspect the HTML through the browser console it shows 2 link tags and the network tab shows it is failing to load the one that is added because it doesn't exist. anyone have any idea what is going on?
extended-salmon
extended-salmon10/16/2025

Loading state while loader data is loading

Hi TanStack Start people, I have a simple file route that uses a server function to return some data from my database - what is the best way to show a loading state while the function is executing, similar to loading.tsx in Next.js? I've tried defining a Route.pendingComponent but that doesn't seem to work - It just keeps the request loading for 2 seconds before returning the full value...
No description
xenial-black
xenial-black10/16/2025

Start RC does not pre-render

Hello, I'm upgrading from beta and I cannot predering work. My config is: ``` ...
generous-apricot
generous-apricot10/16/2025

Exposure of codes to the client

Hello! I hope I understand correctly. So that: - createServerFn() and createServerOnlyFn() both runs on the server...
like-gold
like-gold10/16/2025

How to update router context globally within `beforeLoad`?

I have a layout route "/admin/_authenticated". I want to check context's isAuthenticated property in beforeLoad method of this route and update the context in such a way that the updated context is immediately reflected everywhere, as if I'm updating a global variable. Global variable technique works fine, but I think it's not a clean way of doing that. My use case: Implementing cookie-based auth. Backend is separate (Express). The idea is to check whether session is active on initial load, and if so, to update isAuthenticated key of context, accordingly; otherwise, to redirect to login route. The problem is that the context keeps being stale on beforeLoad calls executed when redirecting user among sibling routes. Another approach would be to use a custom React Context hook, but there is no convenient way to "inject" the hook into the router like it's done in Tanstack Router (example)....
correct-apricot
correct-apricot10/15/2025

Tanstack Start Vercel Deployment - Too many directs?

Why might I be getting too many redirects when trying to deploy to vercel? Try deleting your cookies. ERR_TOO_MANY_REDIRECTS ...
correct-apricot
correct-apricot10/15/2025

How to add react compiler to Tanstack Start RC?

Below is the code I used in the tanstack start beta ``` import { tanstackStart } from '@tanstack/react-start/plugin/vite' import { defineConfig } from 'vite'...
correct-apricot
correct-apricot10/15/2025

Migration Guide to go from Tanstack Start Beta to RC?

I think someone might have posted a migration guide from tanstack start beta to RC but I can't find it anymore. I would appreciate if anyone could point me in that direction. I'm running into some issues like this. ```...
metropolitan-bronze
metropolitan-bronze10/15/2025

[Build] tanstack-start-injected-head-scriptRollup failed to resolve import "tanstack-start-injected-

Trying to build my project. Getting; ```āœ“ 3364 modules transformed. āœ— Build failed in 1.72s error during build:...
rival-black
rival-black10/15/2025

TanStack Start and Emotion with SSR and streaming

I found this previous question and a github post about this topic: https://discord.com/channels/719702312431386674/1345163703267627088/1345163703267627088 https://github.com/TanStack/router/issues/2867 I have verified that the approach referenced in both does work for SSR, but when I attempt to use streaming, I hit the hydration mismatch error again. It appears to be a race condition between the streamed document request completing and some component that was initially server rendered and is using useSuspenseQuery. If the component unsuspends before the streaming completes, that seems to be when the hydration mismatch occurs. But I'm also not sure I'm following it correctly šŸ™‚ ...
adverse-sapphire
adverse-sapphire10/15/2025

Is it possible to fetch some data in loader with cloudflare workers?

When developing locally everything works fine. Howevere once I deploy my app to cf workers I'm getting errors. Idk if there is error in my setup or whether it's simply impossible to so
correct-apricot
correct-apricot10/15/2025

typesafe api routes

Is there any future consideration to make first party orpc like thing in tanstack echosystem. I want to utilize my server routes in typesafe way in web application. server functions are good but not scalable to mobile and other integration... it is simple to create such proxy if we have endpoint at 'api/users/invite: post` it should be like api.users.postInvite() but also params, search params and body should be typesafe.......