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

adverse-sapphire
adverse-sapphire11/30/2024

Tanstack Start for Static Prerendering with Client Side Rendering but not Server Sider Rendering

Like the title, I want to use Static Pre-rendering for landing and first couple of pages such as login, signup page. After that, I only want Client side rendering since it may needs dashboard fee like some complex UI changes, so guess no need SSR. I wish I can create Static pre-rendered site for the first couple of pages with only Tanstack router, but seems not supporting on there. Does SSR is by default in Tanstack Start? I wish I could deploy to AWS S3 with the couple of static sites and SPA a...
xenial-black
xenial-black11/28/2024

Does deploying a new version of a tanstack start application break server actions?

An unfortunate thing that I have experienced with server actions in Next.js is that when the user is browsing the website on the current version, then I push a new version to production, the server actions no longer work and I get errors in return. Using API routes in Next.js solves this problem, but I'm liking the DX of server actions. Is this also a problem in TanStack Start, where server actions only work on the currently deployed version, and then they break when a new version is deployed while the user is browsing?...
No description
flat-fuchsia
flat-fuchsia11/27/2024

SSR

Hello, I started exploring this documentation: https://tanstack.com/router/latest/docs/framework/react/start/getting-started, as my previous projects were built with Next.js Iโ€™d like to understand how to determine if a component is client-side, similar to how itโ€™s done in Next.js using "use client" or "use server". By default, is all the code rendered using SSR? :yweirdfrog:...
dependent-tan
dependent-tan11/27/2024

Flash caused by head component in _root

Seems to be something going on the with either the Meta component of how the root is SSR because it causes a flash to occur on pretty much every page load. Could potentially be related to the css that added as a stylesheet in meta, but removing it doesn't change the error. (see attached)
No description
ambitious-aqua
ambitious-aqua11/27/2024

Using TRPC with procedures that require auth on a server

Anyone has an example of the following: - Route that uses TRPC procedure. It's called both in loader(saved to queryCache) and then in component. - Procedure is protected by auth that reads cookie to check for user The problem I have is that I can't just create createTRPCClient with httpBatchLink url because to access auth cookie when making calls from server I'll need to manually pass headers to second call....
ambitious-aqua
ambitious-aqua11/27/2024

Deploy the backend to another domain

Hello, I'd like to know if it's possible to have the "backend" part of the bundle deployed to another domain than the one hosting the frontend part. For example I'd like my frontend to be served at https://acme.com, and the backend at https://api.acme.com (server functions + api routes). I'm asking this because of technical limitations on the target I'd like to deploy. ๐Ÿ˜„...
extended-salmon
extended-salmon11/27/2024

onSuccess is not working in component file but working in query file

const addUsers = useAddUsers(); addUsers .mutate( { ids: payload.list,...
rare-sapphire
rare-sapphire11/27/2024

Redirect to external URL from server function 2

To avoid necroing the original thread, Tanner has suggested to return a 302 and redirect 'as normal' https://discord.com/channels/719702312431386674/1299757633758035998/1299766886631870474 But this in fact does not work, and instead you get ``` {"message":"Request failed with status 302","body":{"result":{"$undefined":""},"context":{}}}...
dependent-tan
dependent-tan11/26/2024

Using Convex Auth - TypeError: Cannot destructure property 'signIn' of useAuthActions

Using @tanstack/start and when I go to create a signin component: ``` import { useAuthActions } from "@convex-dev/auth/react"; ...
optimistic-gold
optimistic-gold11/25/2024

Redirect from Middleware

Hello, is it possible to redirect from a middleware function? It doesn't seem to be working correctly for me when calling a serverFn from the client when the middleware would throw the redirect. I am using useServerFn for the serverFn, but not sure if there's an equivalent hook that is needed for the middleware as well; currently just getting the following error in the console:
react-dom_client.js?v=a8826ad7:6490 Uncaught Error: Switched to client rendering because the server rendering errored:

{to: ..., isRedirect: true, statusCode: ...}
react-dom_client.js?v=a8826ad7:6490 Uncaught Error: Switched to client rendering because the server rendering errored:

{to: ..., isRedirect: true, statusCode: ...}
...
wise-white
wise-white11/25/2024

Modifying localhost

I would like to use app.localhost instead of just localhost, but I can't seem to make a proper configuration on app.config.ts, nor do I seem to find any examples anywhere. Thank you for your help ๐Ÿ™‚...
ambitious-aqua
ambitious-aqua11/25/2024

Is it possible to deploy server functions to Deno?

What the title says. ๐Ÿ˜„ I'm interested in TanStack Start and I'd like to know if the compiled backend bundle(s?) are deployable to Deno runtime....
sensitive-blue
sensitive-blue11/25/2024

Need Help Getting Started with TanStack

Hello,
I'm new to TanStack and I would like some clarification on an issue I encountered I followed the getting started guide in the TanStack documentation at the following link: https://tanstack.com/router/latest/docs/framework/react/start/getting-started and everything worked perfectly. After testing several features of TanStack, I tried using validateSearch. However, I noticed that once I use validateSearch in createFileRoute, none of the onClick buttons work anymore. Is this normal behavior? ...
genetic-orange
genetic-orange11/24/2024

Async Req for Context

Hey when setting up my app, I want to query the server to see if the user is logged in (redirect to login-in page if not) Is there a better way to do this than having the loading state? ```tsx...
dependent-tan
dependent-tan11/24/2024

Whilst in debugging mode - anyone else happen to come across the `#crypto not found` error

Using bun with @tanstack/start and @clerk/tanstack-start, following their getting started guides, build the app then try to run with bun .output/server/index.mjs - yeilds a "#crypto not found" error. I know this probably more a bun issue with interoperability, but theres no resources I can find to resolve, wondering if anyone has come across similar (๐Ÿคž maybe with a fix)
correct-apricot
correct-apricot11/23/2024

Sentry integration with TanStack Start

Hello everyone, I'm trying to setup Sentry with TanStack Start but I cannot find how to correctly do it to track everything both in server and client context. Does anyone has any pointers?...
conscious-sapphire
conscious-sapphire11/23/2024

Pre-render routes

Is it possible to pre-render routes to flat html via start? I only see docs for ssr and not ssg. Weโ€™re currently using Astro for this but would be great to consolidate everything together
xenial-black
xenial-black11/23/2024

Global middleware for server functions

Is there a way to have a global/default middleware for server functions? As in you don't have to add it manually to each serverFn? Basically I am looking to make server functions require authentication by default...
like-gold
like-gold11/22/2024

createServerFn method type

Is it by design or I'm not getting the type suggestion for POST method ?
No description