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

modern-teal
modern-teal6/1/2025

tRPC + Tanstackk Query Wrapper

Does anyone have an example of a wrapper function / hook that returns hooks for mutations and queries? I'm thinking something similar to RTK where you can use the createApi function and inject endpoint, then return useThisMutation useThisQuery. It'd be nice to have a single file for each trpc router that calls the tanstack useQuery or useMutation, queryKeys defined in that same file also, not have to call the useTRPC and useQueryClient hooks in every component that makes a networ...
optimistic-gold
optimistic-gold6/1/2025

Run GraphQL using server functions

Hello, I am trying to offer a GraphQL API using TanStack Start server functions. Is this possible? I have not found any example yet 😢
optimistic-gold
optimistic-gold6/1/2025

Server side library running on client

Hello, I am a tanstack start begginer. I am trying to switch from Prisma to Drizzle ORMs because I was facing a weird issue with Prisma. My server code requires .env variables, but the client browser is trying to execute the same code, which causes of course an issue. I am trying to do this: ```ts import 'dotenv/config'; import { drizzle } from 'drizzle-orm/libsql';...
deep-jade
deep-jade6/1/2025

Tanstack start wrangle dev cloudflare worker

@VickyCena want to test wrangler dev in local in miniflare. After doing build, I am getting a issue on react dom server on running wrangler dev, It is working fine by running vinxi dev, Can someone help me who are familiar with wrangler and cloudflare deployments X [ERROR] Could not resolve "react-dom/server" .output/server/chunks/build/report-DwJEuG7y.mjs:25:7:...
like-gold
like-gold6/1/2025

SIGTERM hook/teardown logic

I have a TanStack Start app, and it needs to perform some teardown logic when receiving a SIGTERM. What would be a suitable place for such a hook?
ugly-tan
ugly-tan6/1/2025

How to trycatch the entire defaultAPIFileRouteHandler and return a 500 status code ?

I want to return a 500 status code when any of the /api/ routes throw an error. Currently by default setup from the docs shows this with the stack trace. how do i manage to try catch all the /api/ routes and return a 500 with like the following json { message: "internal server errror" } i also would like to have the exception console.log()-ed how do i manage to do this ?...
No description
ambitious-aqua
ambitious-aqua6/1/2025

Uncaught Error: Invariant failed client-DoMLDTIj.js:50

I deployed the app using docker and bun in production. It's working fine but sometime on hot reload like with F5 sometime it's throwing this error and didn't redred any ui. Any idea why it's happening?
No description
fascinating-indigo
fascinating-indigo6/1/2025

Accessing `request` in middleware

Wondering if you can access the request object in global middleware? I only have the response, along with other things.
exotic-emerald
exotic-emerald5/31/2025

running under https on localhost [solved]

Hello I'm trying to run tanstack start in development using https and a custom domain name (eg local.example.app:8080) i managed to get it running (using vinxi --host, setting up an env variable HOST=local.example.app and generating self signed certificates and using them) im having an issues related to hmr as it does not seem to work (the websocket connection fails) i couldnt find any documentation on this is there any way to have tanstack start run in this configuration? edit: everything works fine if im using https using https://localhost its just when adding the configuration for the host i see the issue...
ambitious-aqua
ambitious-aqua5/31/2025

notFound() doen't render css styles!!!

i'm throwing a notFound() when the slug doen't match the parameter like below. But somehow the styles is not attached/ redred in the browser. i have set the notFoundComponent: () => <NotFound />, in __root.tsx. However for any Not found routes like '/cccc', '/pppp' it does show the all the styles only having issue when throwing explicitlly in beforeLoad. ``` beforeLoad: ({ params, search }) => {...
No description
passive-yellow
passive-yellow5/31/2025

Client-side JS does not work at all, h3 error in console

My app works perfectly in the developer mode. When I deploy to netlify or vercel, all of my client side JS breaks, and nothing works. There are no build errors. In the browser console, I'm getting this error: Uncaught (in promise) TypeError: Failed to resolve module specifier "h3". Relative references must start with either "/", "./", or "../". My app.config.ts looks like this: ```...
spiritual-aqua
spiritual-aqua5/30/2025

Could not resolve "tanstack-start-router-manifest:v"

I'm just getting this error trying the alpha.17
No description
extended-salmon
extended-salmon5/30/2025

Access Current Navigation State

I was wondering if there's a way to access the navigating state. On mobile because of route loaders navigation isn't instant and I would like a way to indicate that, like an indeterminate page loading progress bar that is displayed between the user clicking a link and the next page loading in. Is there some way to access the loading state of the location a user is navigating to?...
judicial-coral
judicial-coral5/30/2025

Clerk Billing & Protected Routes

Has anyone integrated clerk billing into their tanstack start routes? Wanted to know how their <Protected/> components are working for y'all with loaders in the route? Example: I don't want to allow a user to access my /dashboard route unless they're subscribed and authenticated....
optimistic-gold
optimistic-gold5/30/2025

Navigating between some pages is not instant

Hi everyone. I have few routes that render just static content. The structure looks like this: - / - /settings...
rare-sapphire
rare-sapphire5/29/2025

query params

How can i access query params in api routes? Only path params are documented
ugly-tan
ugly-tan5/29/2025

How should i do auth while using createServerFn() ?

are sessions the only way ? i saw useSession() in basic-auth but i dont know what it uses under the hood.. if its cookies then how can i do csrf without adding the csrf token as param to the function every time i want to write something ? I would like to avoid cookies because of CSRF and avoid any database writes or file system writes because I'm trying to run it on the edge with cloudflare workers. is there a way to add a global header setting like how it is in tanstack query where i could do something like "Authorization: "Bearer <token>" ? hope I didn't miss something in the docs, and i couldn't find it. I understand its still in beta but I would be glad to help around writing docs and stuff. current Auth page just looks like an Ad instead of useful docs....
vicious-gold
vicious-gold5/28/2025

rollup failed to resolve import react jsx runtime

keep getting this error but only on gh actions, not locally ```bash šŸ“¦ Compiling server router... vinxi building router server in http mode...
metropolitan-bronze
metropolitan-bronze5/27/2025

Client context in middleware type is `undefined`

I want to send part of the client context to the server as part of a middleware I'm making. How do I change the type of the context that is passed to the client() function? Typescript is complaining it is undefined: Example from the docs: ``` const requestLogger = createMiddleware()...