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

extended-salmon
extended-salmon3/1/2025

How would you guy use HonoJS in Start?

I want to migrate my NextJS app with a Hono server inside of it to Start, I implemented as the Hono tutorial. How should I implement it in Start?
optimistic-gold
optimistic-gold2/28/2025

Emotion and Tanststack Start

Have someone have successfully manage to configure emotion base framework like material-ui with tankstack Start ? Bae on the documentation https://mui.com/material-ui/guides/server-rendering/ we need to ReactDOMServer.renderToString the whole component on the server and extract/build the css and inject it into the meta tag. Here are express (https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-express-ssr) and remix (https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-remix-ts) configuration... I dont see a way within ssr.tsx to renderToString the whole page.... any suggestion?...
crude-lavender
crude-lavender2/27/2025

Shared API Route or Server Functions across projects (OpenAPI?) - no monorepo

Is there a way to effectively share the type definitions of either API routes or server functions so they can be used in other projects? For example, I have a mobile app (Expo) that I'd like to make calls to my TanStack Start app.
absent-sapphire
absent-sapphire2/26/2025

Dark Mode

Has anyone created the Theme Provider ShadCN suggests for the "Vite" solution? Where did you wrap? I tried wrapping.. ```...
wise-white
wise-white2/26/2025

Where is the Server Side Entry Point?

I'd like to know where the server side is started so I can implement Bugsnag and database setup. This is for a nodeJS/Docker project.
rare-sapphire
rare-sapphire2/26/2025

SSR set initialData for Tanstack Query (useQuery) isn't working

Am I doing something wrong because useQuery initialData on server is not being set from route state data resulting in a flicker of UI / hydration errors. If I only use the state data all is good however I can't do optimistic updates via queryClient API used by useQuery/useMutation . ```tsx...
conscious-sapphire
conscious-sapphire2/26/2025

create-tsrouter-app and tanstack-start

Currently create-tsrouter-app with the tanstack-start addon selected creates a "src" folder. The tanstack-start documentation says things should be in an "app" folder. Does it matter @jherr ?
like-gold
like-gold2/26/2025

What i18n library do you use for working both on the frontend and backend?

What library do you all use for frontend + backend in Tanstack Start?
foreign-sapphire
foreign-sapphire2/25/2025

How to custom React vite plugin

Hi ! I want to test react-strict-dom with TanStack start but I don't really know how to custom the react vite plugin to use StyleX + RSD babel plugin/preset. Thanks! ```ts...
adverse-sapphire
adverse-sapphire2/25/2025

changing URL without triggering a navigation

I'm having a very hard time getting this to work: - I have a route /chat where after I submit a form I'd like to update the URL to /chat/{id created client side} but NOT trigger a navigation to the /chat/{id} route - In my form submission handler I've tried:...
adverse-sapphire
adverse-sapphire2/24/2025

server function call printing non-null within implementation, returning null from within API route

Hi--I have a server function that I'm calling from an API route, and when I log the return value in the API route it is null, however when I log from within the server function logic I see that it is returning non-null... how do I debug this?
metropolitan-bronze
metropolitan-bronze2/24/2025

Extracting components from routes

Hi all, this feels like a noob question, but: what is the standard way in file-based routing to extract a component from my page to it's own file? I can obviously create a shared app/components/ directory for truly shared components (like Card, Button etc), but how about single use components that only exist on one page? If I for example create routes/profile/AboutCard.tsx it seems to assume that this is a new route, but I just want it to be a component that my routes/profile/index.tsx can import....
sunny-green
sunny-green2/24/2025

Redirect and set cookie from server function called in loader

Hi, I have a page that validates a token from an email link and then sets a cookie and redirects to a page the user now has access to. You can imagine this would work similar to an "magic link" email based auth system. When I try to set the cookie and redirect from the server function called by the route's loader, the cookie seems to never be set....
grumpy-cyan
grumpy-cyan2/23/2025

weird type stuff trying to wrap `createFileRoute`

basically i'm just trying to create a tiny utility that sets ssr: false by default on my route definitions. the types in router are pretty crazy, so i'm trying to use typescript helpers to do most of this. i have something that seems as though it should work, but for some reason I'm getting weird ts errors about circular dependencies and definitions referencing themselves ```ts export function createFileRouteWithoutSSR(path: keyof FileRoutesByPath) { const addRouteConfig = createFileRoute(path);...
grumpy-cyan
grumpy-cyan2/23/2025

recommended way to redirect from api route?

i don't see any obvious way to do this. best thing i've come up with thus far without causing a 503 and/or just not executing the redirect is ``` return new Response(null, { status: 302, headers: { Location: "/",...
useful-bronze
useful-bronze2/21/2025

Deploy Start to AWS

Hi all, I'm evaluating using Start for a new project which will be hosted in an Asia AWS region. Platforms like Netlify/Vercel/Clerk have pretty bad latency over there so we plan to do everything within that AWS region. I didn't find much resources on how TanStack Start can be deployed inside AWS, and tools like SST doesn't support Start yet. Is it too early to try to run Start entirely on AWS infra?...
deep-jade
deep-jade2/21/2025

How to use decorators

How does one use decorators with tanstack start and the vite app config? Eg to use something like mobx
absent-sapphire
absent-sapphire2/21/2025

Is deleteCookie blocking?

``` import { deleteCookie, getCookie, setCookie } from "@tanstack/start/server"; if (sessionCookie) { // Kill the session cookie for this user...
adverse-sapphire
adverse-sapphire2/20/2025

Public Routes Domain + Auth Routes Subdomain

As the SPA mode is rolling out soon this came to mind. Can this be achieved in one single TSR app? Public routes on company.com/* (ie marketing page and blog… SSR) Auth routes on tenantName.company.com/* (SPA) ...
frail-apricot
frail-apricot2/20/2025

scrollRestoration issue/question with Start + Router

We have a website which uses TanStack Start and Router and we have scrollRestoration set to true in our router. We noticed in the deployed site sometimes when we navigate to a link in the site it loads the new page but then the scroll is offset lower down on the page, rather than at the top. Example: 1. Load page A. Scroll down. Click link to page B. 2. Page B loads, but already scrolled down, rather than at the top. ...