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

other-emerald
other-emerald6/17/2025

routerWithQueryClient: Invalidating queryClient cache

I'm running into an issue with client-side cache invalidation when using routerWithQueryClient. Problem: I have a loader that prefetches data on the server: ...
stormy-gold
stormy-gold6/16/2025

Server side environment variables in production?

I'm trying to use node-server to serve my application. In DEV, all my environment variables (like DATABASE_URL) are working fine. When I go to serve with node ./.output/server/index.mjs, none of my server environment variables are there. Is there a common solution for this? I'm on 1.121.21 ```
node ./.output/server/index.mjs
...
eastern-cyan
eastern-cyan6/16/2025

Can't redirect in server functions with middleware

I am not sure if this is a known issue/limitation, but from what I can tell, throwing redirects in server functions that use middleware don't work. It works fine if I remove the middleware since I am using the useServerFn() helper hook on the client. The problem seems to be that the isRedirect() helper from @tanstack/router-core expects the response to be a type of Response with an options prop. When using middleware, the response is a plain object....
optimistic-gold
optimistic-gold6/16/2025

Programmatically run node server

Is there a way to use the node server programmatically? The use case is to run tanstack start but also have a basic scheduler/job executor. I'd prefer to not have to spin up another service just for that.
robust-apricot
robust-apricot6/16/2025

Runtime client env variables

Our workflows rely on creating docker images that can be reused across different environments. Because of this I've been trying to add the ability to use runtime client environment variables rather than relying on import.meta.env to bake them into the image during build. I have been trying to implement it using https://import-meta-env.org/ but can't get a working solution, especially when I introduce t3/env. Anyone managed to achieve this or similar?...
wise-white
wise-white6/16/2025

SPA mode in Dev

Hello :). Can we use the SPA mode in dev (meaning no SSR at all) ? I understand it is possible after building (so for production I guess) ...
wise-white
wise-white6/16/2025

[Devinxi]: How to setup lingui

Hi, need some migrating lingui. Currently getting duplicate hydration on prod https://github.com/lingui/js-lingui/tree/main/examples/tanstack-start...
wise-white
wise-white6/15/2025

Devinxi Migration

There seems to have been quite a lot of changes between 16 and 17. I'm wondering if anyone's written up some help for migrating things over?
ratty-blush
ratty-blush6/15/2025

How can I alias a route.

Hi there, I am trying to add translations to my site, and I'm struggling with the route paths. For example, I would like to do the following:...
optimistic-gold
optimistic-gold6/14/2025

Couldn't load app

I'm getting this error when trying to build the app. Using npm run build. vinxi v0.5.3 Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './config' is not defined by "exports" in /mypath/node_modules/@tanstack/react-start/package.json imported from /mypath/app.config.timestamp_1749937978770.js...
No description
harsh-harlequin
harsh-harlequin6/14/2025

Stateless fully-authed SSR

Hi there, I maintain a tanstack router app that is fully authed, which uses an external OIDC provider to handle session state, as the provider returns an OIDC token, which I use to make to make requests to a separate backend. I'm trying to explore whether this is possible in an SSR environment, as I want initial loads to avoid waterfalls. The thing I keep getting hung up on is how to handle making requests to my actual backend. On initial load, it can use the token to hydrate the page, and If I'm storing my OIDC token in SessionStorage, I can directly make API requests to the backend on the client-side. However, if stored as a HTTP Only cookie, I can't access that client-side, but I can intercept any request via a generic ServerFn and use the cookies to add an authorization token to then hit my backend, but that would add an extra hop....
other-emerald
other-emerald6/14/2025

I want to make partial routes as spa and rest as ssr in tanstack start how can i achieve this

I have app route which i wanted to work as a spa but it's not using ssr props setting in the router function it is returning null
optimistic-gold
optimistic-gold6/14/2025

how to configure after devinxi for github pages

Hi, I switched to the current tantstack start version. Unfortunately I don't get it to run on github pages. This was the config in the app.config.ts before ```typescript import { defineConfig } from "@tanstack/react-start/config";...
graceful-blue
graceful-blue6/14/2025

Best way to include fonts?

I am importing
import "@fontsource-variable/roboto";
import "@fontsource-variable/roboto";
...
generous-apricot
generous-apricot6/14/2025

Syncing 2 virtual lists

Hey, the goal is to Sync (with no lag) the scrollTop value of two virtual lists that are in different scroll containers. The two lists have same number of elem + same eleme height but the rest is different so I cant use lane=2....
harsh-harlequin
harsh-harlequin6/13/2025

How to execute code on start's startup ?

Hi ! I need to execute migrations and stuff on tanstack start launch, where can I do that? I tried on ssr.ts but it get executed (once, so cool) but it gets ran only when I first visit a page. I tried to search inside the Discord, some mentionned to do that through a Nitro module/plugin, I did try, but I can't get what I need to run inside (working with cloudflare and can't get cloudflare bindings working inside it)...
ratty-blush
ratty-blush6/13/2025

Cookies on the client

Is there an equivalent of getCookie, setCookie, parseCookie, etc from '@tanstack/react-start/server' but for the client? I'm trying to setup i18next and ran into hydration mismatches, so I'm trying to set it both on the server and the client from a cookie.
foreign-sapphire
foreign-sapphire6/13/2025

Is `build.target` no longer passed to `nitro` with 1.121.x

It seems to always be es2019 when the nitro plugin executes. I reproduced this with the start-basic repo but not sure it's a bug or maybe a misunderstanding: ...
xenial-black
xenial-black6/13/2025

Is there anyway use an index.js rather than .mjs as an entry?

It doesn’t seem like there is any control over the build files??
rare-sapphire
rare-sapphire6/13/2025

Best way to get path slug in createServerFn?

I have a server function that needs to get the projectId from my path /dashboard/project/1 At the moment I am using react-query and I am getting the projectId from the cliente with useParams and passing the id as a data parameter to the server function. But I would like to know if there is a better way....