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

grumpy-cyan
grumpy-cyan11/8/2024

Feeling a lag on routing

I have pages with data loading using react query. The inbuilt loader is not used. Ideal scenario: when I click the link, that page with loading should appear. But instead I'm seeing a small lag then page with loading appears. I'm running on a Macbook Pro and I tried out in dev as well as prod there is a small lag between route changes. Is there any fix or reason behind it....
foreign-sapphire
foreign-sapphire11/7/2024

Calling server functions from API route?

Am I doing something wrong or is this not supported? search is a server function defined in another file. Nothing crazy in it, just a db call.
No description
inland-turquoise
inland-turquoise11/6/2024

Server functions not working with forms

The server function url seems to always be set to http://localhost:3000, so it works in dev, but not in production. Example from docs ```ts import * as fs from 'fs'...
robust-apricot
robust-apricot11/6/2024

Server Graceful Shutdown

Whats the recommended to run clean ups on shutdown? Is it by trying to hook into the nitro shutdown stuff? Someone asked the same thing about a month ago, but maybe things have progressed since then: https://discord.com/channels/719702312431386674/1238170697650405547/1290703036129480757...
metropolitan-bronze
metropolitan-bronze11/6/2024

How to deploy Start to Vercel?

Should i set the default presets for vite?
metropolitan-bronze
metropolitan-bronze11/4/2024

public path for static assets

how can I set a public path to serve static images and pdfs? would be the equivalent of Nextjs /public folder....
metropolitan-bronze
metropolitan-bronze11/4/2024

how to set auth session duration with Convex auth in tanstack start

I set Convex Auth in Tanstack start but have to login every few minutes when I reload the page. How to set up dev so the login session lasts 30 days?...
fascinating-indigo
fascinating-indigo11/3/2024

Does Start work with Router's defer() out of the box with SSR?

EDIT: I thought I had been testing on node as well as bun, but I think something was autodetecting bun and starting a worker/child process with bun automatically even when running the vinxi dev command with npm. After wiping bun.lockb and doing a fresh packages install, then running with npm, things are streaming correctly. Then running with bun run --bun dev, I get the blocking behaviour back. So something streaming-related is broken when running under bun. Should start work with router's defer() and serverFns when SSR is enabled? I'm trying to render a sidebar in my __root that displays some non-critical async data, so I followed router docs for defer() but it seems as though Start's SSR is not streaming the response to the client until the deferred promise has resolved Context: Running locally on dev server, Windows, same behaviour on node (I thought I was testing under node, but something was autodetecting my bun lockfile and "helpfully" using bun despite running with npm) and bun. Tested on tanstack versions 1.74.0 and 1.78.3...
rival-black
rival-black11/1/2024

Not sure if this belongs in #start or #query, but type inference when using server functions

Hello, not sure where this belongs, but I'm using Start and Query and my type inference seems to be wrong when my objects contain dates. See images and code related. ```ts import { queryOptions } from "@tanstack/react-query"; import { redirect } from "@tanstack/react-router";...
No description
wise-white
wise-white10/30/2024

Bug in navigation

I am facing a weird bug. Any help is appreciated. Context: I have setup a nav header in my __root.tsx...
No description
foreign-sapphire
foreign-sapphire10/30/2024

rollup-plugin-typescript2

Not sure if it's a skill issue or something, but adding rollup-plugin-typescript2 seems to break types in Start, not sure if this should be supported but wondering if there's an out of the box way to add TS transformers like such?
No description
optimistic-gold
optimistic-gold10/28/2024

How to detect route hydration completed?

I'm working on migrating a large app from Vike to TanStack Start / Router and am not sure how to know when hydration has completed on my first route component so I can safely update its state based on LocalStorage values and avoid hydration mismatches. Vike exposes a hydration completed callback which I then use to set state in Zustand, which propagates to my React components via hooks. I've tried lots of different things in TanStack router, from listening to events (e.g. onBeforeLoad) to awaiting router.load() to using a useEffect() in my <RootComponent> or a parent/sibiling of <Outlet />, but they all tend to fire before a useEffect() fires in my route component. This would be fine if I had a single route component, but of course I have many routes, and I don't want to have to stick a useEffect() (or use a wrapper) in every single route component. ...
No description
absent-sapphire
absent-sapphire10/28/2024

Integrating Tanstack Start & Astro together

I wondering if it makes sense to combine both Tanstack Start (say, an internal user facing app with and/or without authentication) and Astro (say, for the marketing part of the website like root / , /blog , etc routes, everything else would use Tanstack start) I see some good guides online about integrating Tanstack Router with Astro but curious how this differs using Start https://bjoernf.com/blog/tanstack-router-spa-co-located-in-astro...
rival-black
rival-black10/28/2024

`createRouter` types: not passing convex property through

I'm having trouble with types when I copy the https://github.com/TanStack/router/tree/main/examples/react/start-convex-trellaux/convex example outside the monorepo. In the monorepo createRouter properly forwards the context, but when I copy the example out of the monorepo the context is gone. I'll look into it, just checking if anyone's aware of the context property not being properly forwarded in some situations....
No description
dependent-tan
dependent-tan10/28/2024

Navigation challenge for TanStack Start

I absolutely love the work being done here. I wanted to mention some navigation challenges while exploring TanStack Start which might impact adoption. After clicking "Try the Alpha" button, the left-hand navigation unexpectedly switched to TanStack Router which confused me a bit....
rare-sapphire
rare-sapphire10/28/2024

Start - noscript tags in head

Hey there! I have this setup where I'm conditionally loading styles for users with javascript disabled. It's basically a style tag wrapped with noscript in the head. Will Start support this kind of setup? Loving the project so far 🙂...
sensitive-blue
sensitive-blue10/26/2024

TanStack Start meets Astro Actions?

So I've been playing around with TanStack Start and really loving it. I've also been looking at Astro Actions and it seems like a pattern like that could work with Start? Like some combination of Server Functions meets tRPC? I'm sure there is plenty to consider, but just wondering if this is possible or something thats on folks' radar. Would be curious to learn about if there's any progress on this or limitations to making it work. Or like, if this would be a tRPC feature....
adverse-sapphire
adverse-sapphire10/26/2024

Redirect to external URL from server function

Hey, how do I redirect to external URL from server function? I want to invoke supabase oauth login
other-emerald
other-emerald10/25/2024

Vitest with start

Any examples/suggestions on getting vitest setup with start? Main focus is node tests (for utils/libs) and component tests....
wise-white
wise-white10/24/2024

Public and private environment variables

Context: .env AZURE_STORAGE_CONNECTION_STRING="" config...