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

national-gold
national-gold9/27/2025

How do I read session data outside of the asynclocalstorage context?

Is there some function I can pass a request into and get the session data out? I need to get an API token from the session to use in a proxy middleware in my express server running the whole app.
harsh-harlequin
harsh-harlequin9/27/2025

How to redirect in tanstack mutation ?

any idea ? pass router ? redirect function does not work ( handleRedirects: true )
equal-aqua
equal-aqua9/27/2025

Example of how to forward cookies from client

I am using an external API that creates a session cookie with httpOnly after logging in. How can I forward this cookie from the browser so that I can use it for datafetching?
flat-fuchsia
flat-fuchsia9/27/2025

[RC] Cloudflare-vite unable to run dev server and build

I'm unable to run the dev server after upgrading to RC. The issue seems to be related to the getSession in the root's beforeLoad. https://github.com/khashvin/tss-cloudflare/blob/master/src/routes/root.tsx#L16 How can I fix this? Am I missing something? ...
other-emerald
other-emerald9/27/2025

Getting Started Example's start command not working

There is basic example with the git command npx gitpick TanStack/router/tree/main/examples/react/start-basic start-basic Link: https://tanstack.com/start/latest/docs/framework/react/quick-start This is the first thing we have in getting started, after running this and doing pnpm install, when I run pnpm build and pnpm start, it fails, the reason is start command requires .outputfolder to be generated which is not getting generated currently, we have dist folder and the correct command is not there in start command of package.json...
robust-apricot
robust-apricot9/27/2025

Cloudflare worker env var problem

It's impossible to get public env var from client when it's on cloudflare worker? Like if I have a env var call VITE_BACKEND_URL, it's impossible to get it from client?
foreign-sapphire
foreign-sapphire9/27/2025

Route types not working

Hi all, i've got this search route but none of the types are working properly ```ts const SearchSchema = z.object({ q: z.string(),...
xenial-black
xenial-black9/27/2025

How do I run a server function during SSR?

I'm using TS Start with React Query (based on this example https://tanstack.com/start/latest/docs/framework/react/examples/start-basic-react-query) and I want to get a theme cookie during SSR so I don't get a flash of inaccurate color theme. It looks like if I put the server function in the loader it works but doesn't update and if I put it in a useQuery it updates dynamically but flashes a null / system theme first. I could wire up the loader to pass initial data to the query client but I want to make sure I'm not making it too complicated....
spiritual-aqua
spiritual-aqua9/26/2025

Kill the Start process?

If we're running Start in a docker container and want to have the container die if something is broken in the server (i.e. some required dependency cannot be constructed), is process.exit(1) in the server.ts file the right way to do this?
fair-rose
fair-rose9/26/2025

Custom vite base path causes prerender to fail in SPA mode

When setting vite's base option, I get the following error: ``` [prerender] Prerendering pages... [prerender] Concurrency: 8 [prerender] Crawling: /...
ambitious-aqua
ambitious-aqua9/26/2025

how to handle circular dependency breaking hmr?

I've noticed that hmr does not work properly when using server functions and react query running the start-basic-react-query example and changing anything in posts.route for example will trigger a hard refresh because of the way things get imported, running with --debug hmr produces this output vite:hmr circular imports detected: /src/routes/posts.route.tsx -> /src/utils/posts.tsx -> /node_modules/@tanstack/react-start/dist/esm/client.js?v=0794880d -> /node_modules/@tanstack/react-start-client/dist/esm/index.js?v=0794880d -> /node_modules/@tanstack/start-client-core/dist/esm/client/index.js?v=0794880d -> /node_modules/@tanstack/start-client-core/dist/esm/client/hydrateStart.js?v=0794880d -> /src/router.tsx -> /src/routeTree.gen.ts -> /src/routes/posts.route.tsx any suggestions on how to handle this?...
optimistic-gold
optimistic-gold9/26/2025

Auth with Keycloak

Has anybody successfully used tanstack start with keycloak (server and client auth)?
correct-apricot
correct-apricot9/26/2025

[RC] createServerFn: Getting encoded response in network tab

Hi all, Since the RC update we are getting encoded responses in the network tab. ```export const useGetProduct = createServerFn({ method: 'GET' })...
robust-apricot
robust-apricot9/26/2025

Deploying on netlify and am getting error

The build went fine, but when I opened the app ```ts import { H3Event, toResponse } from "h3"; ^^^^^^^^^^...
flat-fuchsia
flat-fuchsia9/26/2025

[RC] ssr: false causes renderToPipeableStream error

I get this error with a simple component in a simple route. If I remove ssr prop it renders normally.
sensitive-blue
sensitive-blue9/26/2025

Combine SSR and Static Prerendering in the same route?

Hey everyone, I wonder how static prerendering works. I have an app where I use all the features from Router+Start. several pages, nested routes, dynamic segments, data loading, prefetching queries in loader, integration with tanstack query, suspense boundary, ... etc. ...
stormy-gold
stormy-gold9/25/2025

Running `vite build` doesn't create a .output folder anymore in RC

I've been able to migrate my project to RC and everything's running fine but when I tried building it, a .output folder wasn't created, but in the docs the output folder is still used. Any tips about how I can build and start my app? Here's my vite config ```ts import tailwindcss from "@tailwindcss/vite";...
graceful-beige
graceful-beige9/25/2025

Error: createServerOnlyFn() functions can only be called on the server! (After RC)

I am getting this error after the new RC: db.ts:10 Uncaught (in promise) Error: createServerOnlyFn() functions can only be called on the server! at getDatabase (db.ts:10:18) at db.ts:14:19 getDatabase @ db.ts:10...
harsh-harlequin
harsh-harlequin9/25/2025

Build failure in Tanstack devtools with Cloudflare Vite Plugin in RC

Hi all, I'm just trying out Tanstack start with Cloudflare's vite plugin in RC, and i've come to experience a build error that goes away when removing TanStackDevtools from the __root.tsx file. If I remove either the cloudflare vite plugin or TanStackDevtools, build passes....
stormy-gold
stormy-gold9/25/2025

Docs for serialization adapters

I can't seem to find the docs for serialization adapters. Can someone help point me towards them or perhaps a resource that could help?