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

blank-aquamarine
blank-aquamarine10/9/2024

Start + Query = context problem

I have similar problem on my machine like here: https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-basic-react-query?embed=1&theme=light&preset=node&file=src/main.tsx After loading, go to Post page, you will see error. Click try again and posts will show. Why is that?...
correct-apricot
correct-apricot10/8/2024

I18n integration (formerly css loading issue)

app.config.ts: ```ts // ... export default defineConfig({ tsr: {...
rare-sapphire
rare-sapphire10/6/2024

Pattern for data fetching

Which pattern is better in the following case (react query plus next js) A page where multiple child and grand child are dependent on some data from an api let's say user info api Let say some component uses name, someuses contact and some use other things Soo 1. I make the request at the top of the page ...
foreign-sapphire
foreign-sapphire10/4/2024

?url import of css file fails, but straight import of css file with same filepath works

Within my tanstack start project I've followed the same setup as displayed in the start basic example. However when calling a ?url import I get the following error in console:
Uncaught SyntaxError: The requested module '/_build/app/styles/tailwind.css?url' does not provide an export named 'default' (at root.tsx:6:8)
Uncaught SyntaxError: The requested module '/_build/app/styles/tailwind.css?url' does not provide an export named 'default' (at root.tsx:6:8)
...
fascinating-indigo
fascinating-indigo10/4/2024

Disable SSR

In a future release will there be a way of disabling SSR and yet still keep bling? I have an SPA which I'm mulling whether to keep or move to an electron app and therefore don't need SSR. In fact, it's more of a hinderance....
correct-apricot
correct-apricot10/4/2024

Does start have api routes?

Does it support API routes like Remix and Nextjs?
rare-sapphire
rare-sapphire10/3/2024

Easy way to add a proxy during dev?

Is there any easy way to add some proxying during developen? Neither devProxy from vinxi nor proxy from vite seems to be supported currently through defineConfig? Trying to get around CORS when using a hosted staging backend.
automatic-azure
automatic-azure9/25/2024

When can we expect stable release of tanstack start?

When can we expect stable release of tanstack start?
evident-indigo
evident-indigo9/24/2024

Differences between dev and prod (for example with css)

Hello, I'm trying to understand why we have differences in dev server and prod server. For example importing the tailwind css globals like this (in __root.tsx) import "@/app/styles/globals.css"; I can see styles in dev but not in PROD. We need to add ?url and import it as a link . ...
conscious-sapphire
conscious-sapphire9/22/2024

Is there correct way to create abstraction around createServerFn?

Hello, I'm trying to create abstraction on top of createServerFn to validate payload using zod. But I'm running into strange errors. Here is very simplified example: ``` import { createServerFn } from "@tanstack/start"; ...
conscious-sapphire
conscious-sapphire9/21/2024

Correct way to add favicon?

Hello, I'm wondering what's the correct way to add favicon? While looking at examples, I see that most of the metadata are added through meta in createRootRoute, but after trying for a while, I cannot figure out what to put there to render <link />. The only way I managed to add favicon in a way that is actually displayed is through this code inside RootDocument:...
rare-sapphire
rare-sapphire9/20/2024

How to change port of the `node-server` preset build?

How would I change the port when running the build with node .output/server/index.mjs? I managed to change the port with vinxi start --config app.config.ts --port 8080. Why is node recommended over vinxi start, only because it's experimental?
like-gold
like-gold9/19/2024

Are there any know issues with the "aws-lambda" preset?

I 'am currently migrating an SPA with SSR to @tanstack/start. The app is deployed on AWS Lambda, so I was wondering if there are any known issues because of the warning.
unwilling-turquoise
unwilling-turquoise9/18/2024

How to debug streaming hydration errors

I have a hydration error that occurs every ~5 loads on both dev and prod. I'm trying to use something like next-themes to set a theme class on the root element which is where this error originates, but I'm not quite sure where to start with it ```Uncaught Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition. at updateDehydratedSuspenseComponent (chunk-PFMSSJLQ.js?v=2f7b2551:15345:56)...
rare-sapphire
rare-sapphire9/15/2024

Running build locally

Hey crew. Really enjoying start so far! I'm building a simple first site with it and want to run the build locally. When I run npm run build and then npm run start, I'm getting this error: Cannot find module '/Users/xxx/Desktop/Websites/xxx/.output/server/index.mjs' imported from /Users/xxx/Desktop/Websites/xxx/node_modules/vinxi/bin/cli.mjs I see this is also happening on the basic example in the docs when I try building and running build there: https://tanstack.com/router/latest/docs/framework/react/examples/start-basic...
other-emerald
other-emerald9/14/2024

Redirects not working as shown in Start docs

I'm following this page: https://tanstack.com/router/latest/docs/framework/react/start/server-functions#redirects It includes this code for redirects: ``` import { createServerFn, redirect } from '@tanstack/start'...
ugly-tan
ugly-tan9/12/2024

Is progressive enchancement possible

So is progressive enchancement (similar to Remix 📀) possible? If not is it in plan? I really really enjoy the way forms work in Remix, and I had a hard time trying to reproduce the same behaviour with Tanstack start. Sincerely, I believe it would be a big plus for Start, and would make me ditch Remix in favor of Start:)) (BTW what you build is really really cool. Keep up with the good work and congrats🤩)...
correct-apricot
correct-apricot9/8/2024

Is it possible to SSR only the pendingComponent for routes that have a loader?

My goal is to just render the "shell" so all pages are statically generated at build time, and then when a page is hydrated it will run the loader() and anything else it needs to do etc
correct-apricot
correct-apricot9/8/2024

Search params disappearing after first render

Can't seem to figure out how to use URL params if they come from like the initial page load. In my example I want to have an OAuth callback route but the code param only seems to exist on the first render and then it disappears. help!
genetic-orange
genetic-orange9/6/2024

Is there a way to set vite.config.ts server.open option in Start?

https://vitejs.dev/config/server-options.html#server-open Its a quality of life feature to automatically open the app in the browser on server start. export default defineConfig({...