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

flat-fuchsia
flat-fuchsia4/4/2025

Using Start in an nx monorepo

Does anyone have any guidance on what the best way to initialize a Tanstack Start project inside a NX monorepo is?
like-gold
like-gold4/4/2025

How to call a Convex mutation from createServerFn?

I'm lost on how I can use Convex from the server. Here is my attempt ```typescript const convex = new ConvexHttpClient(import.meta.env.VITE_CONVEX_URL); ...
rival-black
rival-black4/4/2025

Tanstack Start "start point"

what is the best way to create a start app? Any official CLI?
deep-jade
deep-jade4/4/2025

css-in-js

There is a way to active ssr for css in js? In next js we have useServerInsertedHTML or we can check here https://nextjs.org/docs/app/building-your-application/styling/css-in-js, any same method for tanstack start?
deep-jade
deep-jade4/3/2025

Tanstack with Ant Design

It possible to use tanstack start with ant design and active the ssr mode? Anyone try it or we have example for that?
national-gold
national-gold4/3/2025

How to trace why various node.js modules were "externalized" leading to large bundle sizes?

So my app does use serverFn and those functions access node.js modules, prisma and jwts, etc and I include those serverFunctions within my various page.tsx routes, but I am careful to not use jwts, prisma, node.js functions within my client side or even just SSR components/route functions. But even so I see a bunch of node.js stuff being "externalized". See image. Thus I must have made a mistake somewhere. How can I easily trace this to figure out where my mistakes are? Being able to trace this would make it super simple to fix. But with the current error messages I am totally lost....
No description
stormy-gold
stormy-gold4/2/2025

Server function middleware that takes an argument

I'd like to use a server function middleware that ensures a user has a given permission before continuing. The middleware accepts a permission as an argument: ``` export const requirePermission = createMiddleware() .middleware([requireUser])...
continuing-cyan
continuing-cyan4/2/2025

Using URL search params with prerendered route

Here's a personal project that uses a static createServerFn for data with route prerendering. The itemHeight search state controls the adjustable height of each gradient list item. As result of the prerendering, the default itemHeight is always rendered on initial page load breaking the adjustable height feature. Id be fine just using SSR here, but when prerendering is disabled I get build errors - I assume because of the static createServerFn expects prerendering to be on. Using a regular createServerFn solves my problem, but then the returned data isn't bundled at build time as static json. Is it possible to use url search state with prerendering/static createServerfn? Perhaps with something similar to how theming is done discussed in this thread using the ScriptOnce component?...
noble-gold
noble-gold4/2/2025

Vinxi migration: how many breaking changes should we expect?

Hi, I've been thinking of migrating our product to Start. Is there a ballpark estimate on what kind of changes the Vinxi migration will bring, and how many we should generally expect to be breaking/paradigm-shifts? Trying to answer if we should migrate now, or wait a few weeks/months until the stable ver. is released....
adverse-sapphire
adverse-sapphire4/2/2025

Prisma import fails in monorepo deployed on Vercel

Looking into deploying tanstack start from a Turborepo on Vercel. I've got some issues import issues from the db package (prisma wrapper). Basically, the generator client looks like this: ```generator client {...
future-harlequin
future-harlequin4/1/2025

Migrating Auth0 & React-Router to Tanstack Start or Tanstack React-Router

I'm trying to work through how I can migrate to Tanstack Start but ran into a couple of issues for our Web App. Background: - WebApp written in TypeScript using React-Router (the remix one) - Built using vite and a static index.html ...
flat-fuchsia
flat-fuchsia4/1/2025

How to get the current path from route.tsx/layout

I'm creating a sidebar and need the path to style isActive on navlink. I want to avoid using useLocation on client to reduce flashing on refresh. I thought Route.path or Route.fullPath would be a good solution, but it outputs 'undefined' and '/' respectively even when I'm on different routes (children). In order to get the actual correct path, I need to go to the page itself and use Route.path, which is not ideal because sidebar is located in route.tsx(layout). Any suggestion on how I should p...
stormy-gold
stormy-gold4/1/2025

TanStack Start with code-based routing

Hi guys, do you know if it is possible to configure TanStack Start with a code based routing? I am porting my static app, configured with the code based TanStack Router to Start, but I don't seem to succeed. Is it possible at all? Is there any example showing how to do it? Thanks in advance.
adverse-sapphire
adverse-sapphire4/1/2025

create-tsrouter-app with Start and Query creates a server-side cache?

I set up my app using create-tsrouter-app, which created a router that imports the TanStack Query client from another file. However, this appears to preserve the server-side query client so that, when loading a page, previous queries that were not involved with the request are also dehydrated and shipped to the browser. Restarting the server eliminates this additional dehydrated data. This strikes me as a security concern. Simply creating the query client inside the createRouter function as sh...
No description
adverse-sapphire
adverse-sapphire3/31/2025

SSR streaming rendering broken with HTML greater than a certain size

Here's the situation: I've got a loader that returns a lot of data which is put into a shadcn/ui table for display. The rendered HTML is from SSR streaming is broken when I return either too many rows OR have too much markup. This then creates a hydration error. 1. I can render 151 rows worth of data. However, as soon as I take 152 rows or more, I get a hydration error and the HTML that's SSRed is broken. 2. I can render 152+ rows without error if I remove the shadcn/ui table elements (which produce quite verbose html) and use plain tables instead. 3. I can resolve the issue by using defaultRenderHandler instead of defaultStreamHandler in ssr.tsx...
No description
frail-apricot
frail-apricot3/31/2025

mdx

Hi, i have been struggling all day trying to get mdx to work with start, any tips on what to search for?
initial-rose
initial-rose3/31/2025

using better-auth to protect the entire route

I have implemented better-auth for tanstack start (https://www.better-auth.com/docs/integrations/tanstack) and I want to protect all pages in the route, how can I do that?
adverse-sapphire
adverse-sapphire3/29/2025

Cannot read properties of undefined (reading 'config')

Whenever I'm navigating in the project I'm getting the error from the title. It seems to be caused by the beforeLoad from __root.tsx The code:...
fair-rose
fair-rose3/29/2025

Root loader staleTime behaviour

I have a server-function that returns the user theme (based on cookies) being called in my __root layout. This should only need to be fetched on the first load, so I thought I could set staleTime to some high value, but looking at the logs and network requests the server-function call is still being made on every navigation and pre-fetch. e.g.: ```tsx...
fascinating-indigo
fascinating-indigo3/29/2025

Deployment on Cloudflare Workers

The documentation currently only explain how to deploy on Cloudflare Pages. Is the any sort of guide for deploying to workers?