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

fascinating-indigo
fascinating-indigo2/20/2025

Tanstack Start + Firebase Auth

Hey friends, for the life of me I cannot find the needle in the haystack here. Looking for some hand-holding ❤️ I'm trying to setup Firebase auth with TSS. Unlike supabase, FB auth is only client side, so I'm trying to wrap my RootDocument with a context provider. ```function RootComponent() {...
other-emerald
other-emerald2/19/2025

Preview not available for Tanstack Table Examples, Error shows: Unable to run Embedded Project

I'm not able to see the preview inside the stackblitz sandbox on the Tanstack table examples. Screenshot for reference:...
No description
fair-rose
fair-rose2/19/2025

Cannot find package after build and start

Hey all, having issues with a subdependency not being found after build (runs fine in local dev) - giving error upon starting the app: [ERR_MODULE_NOT_FOUND]: Cannot find package 'starknet-types-07'
This is imported by by the starknet package as per attached image - but no matter what I do I cannot get it recognised in the vercel preset build (I have tried directly aliasing in my own package.json, importing in shims, various ssr noExternals and resolve aliases - some of which have fixed in a local node-server preset build - but does not seem to fix for vercel...
No description
plain-purple
plain-purple2/18/2025

Client assets (styles/bundles) aren't loaded when using bun preset

Hey guys, i have an interesting issue. When i'm using the bun preset, none of the build assets for the clients will work, but using the node-server preset it works just fine. The config is pretty straight forward too: ``` export default defineConfig({...
No description
foreign-sapphire
foreign-sapphire2/17/2025

Cloudflare d1

Can someone please help me implement cloudflare d1 with tanstack start? I tried to look for the examples but didn't quite find it....
rare-sapphire
rare-sapphire2/17/2025

How can I disable SSR for the notFoundComponent?

I am trying to first migrate to start without SSR and then later on enable SSR. I am aware that the Root Route will always SSR but is there a way to register a default "notFoundComponent" and avoid any SSR on it? As soon as I add define a default not found component i get hydration errors.
fair-rose
fair-rose2/17/2025

cloudflare deployment error: No such module 'node:http' imported from 'chunks/nitro/nitro.mjs

I get the error below when I try to deploy to cloudflare pages:
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "node:http".
imported from "chunks/nitro/nitro.mjs"
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "node:http".
imported from "chunks/nitro/nitro.mjs"
...
dependent-tan
dependent-tan2/16/2025

ensureQueryData in loader

I'm using Start (^1.105.3) + Query (^5.66.3) and I'm trying to ensure query data in the loader Argument in createFileRoute. The problem is that I get Unexpected end on JSON input when I reload the page (i.e server rendered) but it works when I'm loading a page without the loader and then navigate to one which has it. Thanks in advance ...
xenial-black
xenial-black2/16/2025

Automated migration to TanStack

Hey @Tanner Linsley and team! 👋 I've been working on codemods for various migrations (e.g., Shiki) and was wondering if there’s interest in a codemod to help developers migrate to TanStack Router / TanStack Start. I’d love to explore what that could look like! Would this be something valuable for the community?
No description
sensitive-blue
sensitive-blue2/16/2025

Tanstack doesn't setCookie on document reload except client side navigations

Basically, what the title says—I have a server function that sets a cookie and runs in beforeLoad. The server function is supposed to set a cookie. However, if you manually edit the URL and navigate to the page, the cookie doesn’t get set. But if you navigate to the page using client-side navigation, the cookie is set correctly. Reproduction URL https://codesandbox.io/p/devbox/youthful-curran-xl86qh ...
extended-salmon
extended-salmon2/16/2025

Server function dependency injection

What is the best way to DI something such as the db into the handler of a server fn? In remix for example we have getLoadContext which allows us to set up dependencies that get passed as the context argument to loaders and actions. Coming from remix my expectation was: ```typescript...
genetic-orange
genetic-orange2/16/2025

validateClient:true not preventing calling server function when input on client is invalid

I am using a simple middleware which has validateClient set to true with a server function. I expected when I call server function with invalid input, an exception on client side prevent calling the server function. But seems the validation occurs on the server side. I provided the code in the screenshot attached. Am I missing something? Thanks. ...
No description
funny-blue
funny-blue2/16/2025

Problem integrating T3 env in my app.

Hi, I am using tanstack start for first time and was trying to create a template for myself. I was facing problem integrating https://env.t3.gg/docs/core in my app. env.ts ```ts import { createEnv } from "@t3-oss/env-core";...
flat-fuchsia
flat-fuchsia2/15/2025

Persisting cache in localstorage/idb so site can work offline

I know its possible with tanstack query to add a persister that can do this, but can this be done with starts build in route caching? the holy grail for me would be for the entire site to work offline once a simple service worker is added to cache the html/assets etc. All of the server side json would just come from the offline cache and when the connection is reestablished it would be refetched I think I heard Tanner talk about this in a podcast months ago but not sure if anything got done or if its even possible...
constant-blue
constant-blue2/15/2025

emotion babel / swc plugin

how can we add the emotion babel / swc plugin to a tanstack start app, do we have access to the vite plugin react options?
stormy-gold
stormy-gold2/15/2025

External Backend JWT Authentication

I am developing a React application with Tanstack Start that works with an external backend. This backend provides access/refresh token for authentication. I am looking for a way to implement this authentication structure with Tanstack Start. Is there an example on this topic? Or can you give me some ideas on how to proceed?
other-emerald
other-emerald2/15/2025

How to retrieve type of serverFn's returned data?

I've defined a serverFn like so: ``` const fetchDataFn = createServerFn({ method: "GET" }).handler( async () => { return fetchDataFromDB() } );...
correct-apricot
correct-apricot2/14/2025

Looking for a Meta module like Remix/ReactRouter7 for dynamic titles and such

Is Start going to include some kind of Meta function so that we can dynamically set page titles dynamically, either with something set statically in the route or dynamically with vars from a database call? I found soneone else here wrote their own hook which is great. But I'm hoping for a native function. TanStack Router has some bits under https://tanstack.com/router/latest/docs/framework/react/guide/router-context#processing-accumulated-route-context but I'm not sure how to wire it into what S...
like-gold
like-gold2/13/2025

Apollo preload error "Expected a QueryRef object"

@Lenz Weber-Tronic I'm getting this error when using useReadQuery from a ref created by the preloadQuery function your integration gives. It does appear that the data is still presenting so I'm not exactly sure what's going on. I get the error on both Client & SSR. I know this is not a lot of info to go on. I'll keep poking around....
rare-sapphire
rare-sapphire2/13/2025

Run start index.mjs on subpath

I have an existing express app and i want to mount the tanstack/start index.mjs on a subroute of that app. Even when setting a basepath in the router or a baseURL in app.config.ts the nitro server also responds on http://localhost:3000. The routes are correctly only available on http://localhost:3000/hub but as long as it registeres on / i can't run my existing app next to it. How can i configure tanstack start accordingly?...