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

foreign-sapphire
foreign-sapphire1/29/2025

React Compiler in TanStack Start

Hi. Are there any TanStack Start public repo that have React Compiler plugin? Just curious.
deep-jade
deep-jade1/29/2025

Access cookies in loader/serverFn/client

I'm having a hard time trying to use the cookies in tanstack start. https://stackblitz.com/edit/tanstack-router-z2md6zd1?file=app%2Fcookie-loader.ts In __root.tsx loader is a function to initialize the cookie with a value....
other-emerald
other-emerald1/29/2025

ssr: false breaks "vinxi dev"

I am using the "start-basic" example. When marking the users.index.tsx with ssr: false the entire route disappears when running the app with npm run dev (which is vinxi dev). Is this broken in vinxi or is this an issue with tanstack/router|start? When using vinxi build and then running it with node it works. It looks like the vite plugin crashes with a known error, but even full page reloads, cache clearing and re-running npm run dev does not fix it: ``` Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong. See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201...
genetic-orange
genetic-orange1/29/2025

Built successfully, but fails to run

Has anyone encountered this error before? I'm a bit lost on how to debug this one.
No description
rival-black
rival-black1/28/2025

I am getting a weird issue with my production build in tanstack start

My Sign In page looks like this during dev and everything works fine but in production the page is duplicated somehow The second image is how the page looked like in prod (Zoomed out a bit to be able to take a screenshot)...
No description
molecular-blue
molecular-blue1/28/2025

What error is this?

The file does not exist at "/Users/foobar/project/app/node_modules/.vinxi/cache/client/deps/chunk-NYETTEZA.js?v=1d4372d0" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x4)
The file does not exist at "/Users/foobar/project/app/node_modules/.vinxi/cache/client/deps/chunk-NYETTEZA.js?v=1d4372d0" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x4)
Causes the app to fail to load and happens seemingly randomly...
genetic-orange
genetic-orange1/27/2025

Using tanstack to make a post request

How can I use tanstack to make a post Request?
ambitious-aqua
ambitious-aqua1/27/2025

server rendered emotion / css in js in tanstack start

i've been having issues with my css in js styles being applied through chakra ui, which uses emotion under the hood. it looks like emotion exposes its own functions that need to run during the hydration step, and chakra has a guide here for setting it up with remix https://v2.chakra-ui.com/getting-started/remix-guide. does tanstack start have a similar way to override the defaultStreamHandler from ssr.tsx? i suspect that's what i'll need to do
foreign-sapphire
foreign-sapphire1/27/2025

Plans for partial pre-rendering in TanStack Start

Hi. Are there any plans of adding PPR feature in TanStack Start just like in Next.js?
adverse-sapphire
adverse-sapphire1/26/2025

How to Access the Full Path of a Route (Including Pathless Routes)

I’m trying to access the full path of a route in my application, including cases where some parent routes are pathless (e.g., _auth/dashboard). From my understanding, there should be a way to retrieve the full path of the current route, but I couldn’t find any relevant methods or hooks in the official documentation. What I’ve Tried: I looked for a useRoute hook or a getFullPath method in the documentation, but these do not seem to exist in the latest version. ...
ambitious-aqua
ambitious-aqua1/26/2025

node stream build error

getting this error when i attempt to build my app. talks about node stream being externalized from the @tanstack/start-server package
No description
adverse-sapphire
adverse-sapphire1/25/2025

how can i access all children pathname from parent route or __root route

import { createRootRouteWithContext, Outlet, useLocation } from '@tanstack/react-router'; import { QueryClient } from '@tanstack/react-query'; import * as React from 'react'; import NavBar from '../components/NavBar.tsx'; import SideBar from '../components/SideBar.tsx';...
used-violet
used-violet1/25/2025

proxy TanStack Start server function requests to standalone backend?

I have a separate Fastify API. For public endpoints, I can just call this API directly from my Tanstack Start server functions, but I'm stuck on handling authenticated routes that need token refresh. How would one usually handle those scenarios? I read about proxying in Next.js (https://maxschmitt.me/posts/next-js-api-proxy) but that seems to be more about CORS issues rather than auth flows. Unless it solves both? And if so, how would that be done in Start?...
ambitious-aqua
ambitious-aqua1/25/2025

vinxi still?

the docs still have the vinxi instructions but it looks like in the release notes last week you guys replaced some vinxi exports. https://github.com/TanStack/router/releases/tag/v1.97.4 so is this page still the best way to turn a client side TSR app into a tanstack start app? https://tanstack.com/router/latest/docs/framework/react/start/build-from-scratch...
deep-jade
deep-jade1/25/2025

is there a way to mock server functions rpc calls in e2e tests eg playwright?

I am building apps with start and I want to write e2e tests but we have external api and it is not possible to run with start in CI so I am looking for a way to mock server functions rpc calls in playwright tests
optimistic-gold
optimistic-gold1/25/2025

navigate to external url with tanstack router / start

Hey everyone, I couldnt find how to navigate to an external url using tanstack router / start. I am currently doing it in this way but I am wondering if tanstack router supports a better way to navigate to an external url ? ...
rare-sapphire
rare-sapphire1/25/2025

What's the best way to shift to vite/nitro from vinxi?

I'm on Start 1.92.6, and I rely on vinxi start and vinxi build Also in the app I use getWebRequest from vinxi/http to auth against Clerk What happens to client.tsx & ssr.tsx? Repo: https://github.com/cabezonidas/catalog-app Thanks!...
ambitious-aqua
ambitious-aqua1/25/2025

dehydrate / rehydrate apollo cache

looking to fetch a query inside my loader function and then write the apollo cache to a global variable. of course, i'd rather use tanstack query in the router but i'm working on mgirating a legacy project over from nextjs. is there a way to inject a variabe into the html on the serverside? it should be easy enough to read from window.APOLLO_STATE on the client side, but i'm unsure how to write it to the page with the data from my loaders https://www.apollographql.com/docs/react/performance...
adverse-sapphire
adverse-sapphire1/24/2025

Getting `module 'unplugin' does not provide an export named 'createVitePlugin'

Often times when deploying on Vercel and that it uses the previous build cache, the app won't compile with this error: ```sh landing-page:build: vinxi v0.5.1 landing-page:build: file:///vercel/path0/node_modules/@tanstack/router-plugin/dist/esm/vite.js:1...
multiple-amethyst
multiple-amethyst1/24/2025

Checking if there's scroll restoration

I have a case where I want to autofocus an input only if there's no scroll to restore (so that it doesn't jump to the top) - how do I register if there's a scroll restoration registered for the main window?