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

metropolitan-bronze
metropolitan-bronze7/6/2025

Link Options exact: true does not accept searchParams

Hi Guys I am not sure if I overlooked something, but I have following structure ```...
wise-white
wise-white7/5/2025

Running `beforeLoad`/loader functions on client only (SPA mode)

I have an authentication provider that requires authentication on the client side only. I would like to take advantage of preloading, as well as auth checks via beforeLoad, but even with ssr: false and SPA mode enabled, beforeLoad and loader functions both seem to run. This causes issues because the user isn't authenticated yet. Any way around this?...
helpful-purple
helpful-purple7/5/2025

Clerk basic example does not show clerk signin modal on hard reload

Using the bare react start-clerk-basic example, when doing a hard load of the /posts route (or any route within the authed layout), the default clerk SignIn component does not show up. It does show as expected when navigating from home to /posts. Interestingly the "Not authenticated" error in the beforeLoad is correctly thrown, and the error component correctly checks that path. But the clerk modal does not show up. Any ideas?...
ambitious-aqua
ambitious-aqua7/4/2025

Build error using Start with Cloudflare

```bash [nitro 2:43:38 AM] ERROR Error: Cannot resolve "tanstack-start-route-tree:v" from "/Users/zeeshan/src/dashboard/node_modules/.pnpm/@tanstack+start-server-core@1.124.0/node_modules/@tanstack/start-server-core/dist/esm/loadVirtualModule.js" and externals are not allowed! undefined...
deep-jade
deep-jade7/4/2025

Slow server functions on Vercel

I deployed tanstack-start-example-supabase-basic to supabase and I am surprised by the execution time of the server functions. logoutFn is 74ms on my local build and 1.06s on Vercel....
No description
national-gold
national-gold7/4/2025

How can I propagate user state across the backend and frontend?

I’m building an app using TanStack Start and Better-Auth. I want to fetch and access my user state or information during the beforeLoad or loader lifecycle hooks. I’ve seen examples where people put their user fetching logic in the beforeLoad of the __root layout, but when I do that, my page fails to load. Is this the correct approach to handle user state fetching? If not, what is the recommended way to propagate user state across both backend and frontend?...
xenial-black
xenial-black7/4/2025

Remove Error message from ServerFn

Hi! I want to make sure that server fns do not leak some information to the client through error messages. Is there a way to globally register a middleware that would handle this?
conscious-sapphire
conscious-sapphire7/4/2025

Optimized Deps Warning: FloatingTanStackRouterDevtools

Seeing this warning in the logs after upgrading to the new main branch: The file does not exist at "/Users/<REDACTED>/node_modules/.vite/deps/FloatingTanStackRouterDevtools-TM7R3YU7.js?v=50c4cb9a" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to optimizeDeps.exclude....
conscious-sapphire
conscious-sapphire7/4/2025

[RESOLVED] Hydration Issue with Clerk, TSS, & Convex

Morning team, I thought this issue would have been resolved upgrading to the new main branch, but seeing this hydration issue with Clerk, TSS, and Convex. Any thoughts on how I can resolve this? ```...
absent-sapphire
absent-sapphire7/4/2025

Migrating to tanstack start

Hi all, Last Monday we launched our SPA with tanstack router + all tanstack suite to prod. We faced SEO issues, basically our SPA is an empty blank page for google crawlers for all the pages. I've tried for 5 days improve the performance etc, nothing works. I think this is because it's highly coupled to our headless CMS. These are the "crazy things" we do in our SPA fetching data from our CMS - We fetch feature flags to turn on/off some features. - We fetch seo meta data for each page to inject it in the header of the document ...
multiple-amethyst
multiple-amethyst7/4/2025

Data loader called twice

What might be causing the data loader to be called twice during SSR in the solidjs example? For instance on the /users route https://tanstack.com/start/latest/docs/framework/solid/examples/start-basic React example does not seem to have this behavior....
adverse-sapphire
adverse-sapphire7/4/2025

Client and Server code mixing and I don't know how

After migrating from prisma to drizzle I was forced to import "server-only" in my db file: ``` import "server-only"; import { drizzle } from "drizzle-orm/neon-http"; import * as schema from "./schema";...
deep-jade
deep-jade7/3/2025

Throwing redirect from server functions throwing an error in console and not redirecting

Hey folks, I'm using tanstack start + solidjs. I'm trying to throw a redirect from a server function and it's throwing an error on the console. ```javascript // src/lib/auth/actions export const login = createServerFn().handler(async () => {...
No description
ratty-blush
ratty-blush7/3/2025

server env variables

Hey guys, there have been a lot of changes to vinxi, nitro and I am wondering as of the latest tanstack start version how we should go about injecting our environment variables server side. I can pass them through to vite just fine, using VITE_ prefix but when it comes to getting my server side env variables, I cannot find a solution. It seems to work in dev just fine, but not in production...
fascinating-indigo
fascinating-indigo7/2/2025

Create CloudFlare Queue Consumers or DOs?

I’m experimenting with Start (for React) on CloudFlare but i’m not seeing a way to add to my CR worker if i want to add a durable object or a queue consumer. I think react router’s solution is to give you a “createRequestHandler” function (https://github.com/remix-run/react-router-templates/blob/main/cloudflare/workers/app.ts) that can be used in your custom worker function (along with things like creating durable objects or whatever). Is there a tanstack start (or nitro or vinxi) equivalent?...
like-gold
like-gold7/2/2025

Vercel + Tanstack + MUI

Hey guys has anybody had any problems trying to use Vercel with tanstack/start and router? I keep getting the following error from the build "H3Error: EMFILE: too many open files," and it's never the same "open file" it always outputs different files ...
optimistic-gold
optimistic-gold7/2/2025

How to handle server errors on the client side?

Hello, I am trying to learn TanStack Start and I want to show the error on the client side when an error occurs during RPC. How can I do this? Is it possible to subscribe to the states of the RPC on the server side without using a hook like useMutation? When using tRPC, we could catch errors thrown on the server side on the client side. I have this RPC: ```typescript...
No description
extended-salmon
extended-salmon7/2/2025

Does ReactQuerykit gives something extra if I am already using Latest TanStack Query

I am already using latest tanstack query with zodschema for run time validation. as I have read in tkdodo's blog that latest react query version has already type supports. is there something that react query kit helps with vanilla react query doesnot have....
subsequent-cyan
subsequent-cyan7/2/2025

SPA mode triggers `beforeLoad` throw redirect to login because of matched /_authed layout

I notice during the spa prerender that the beforeLoad in _authed/route.tsx runs which in out project throws a redirect to login if there's no session. It still seems like throwing a redirect is correct in examples but perhaps not for auth. Could this be something wrong with the prerender?...
conscious-sapphire
conscious-sapphire7/1/2025

Global Middleware not working after devinxi?

I'm finally getting around to updating my production app with the devinxi updates (1.120.3 --> 1.123.2). Everything seems to be working so far except my global middleware.
I've searched and found two GH Issues about global middleware not working (opened in Feb/Mar but have recent comments - e.g., https://github.com/TanStack/router/issues/3869) and at least one Discord post mentioning that global middleware isn't working.
I haven't seen anything concrete though about this being a known/accepted issue across the board. Maybe I just missed an Issue or something. Is it working for some people? Or is it not working at all post-1.121?...