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

ugly-tan
ugly-tan9/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({...
exotic-emerald
exotic-emerald9/6/2024

Getting loader data from parent route

So I see that it's possible to get loader data from parent routes but I have some questions. 1. In the component, is this the only way to get data from parent route AND current route? ```tsx const { projects } = Route.useLoaderData();...
exotic-emerald
exotic-emerald9/5/2024

Can you redirect in server functions?

Is it possible to redirect in a server function? It's not working for me. I see a uncaught (in promise) error client-side. Error: ``` Uncaught (in promise)...
frail-apricot
frail-apricot9/4/2024

Full differences between server functions and api routes

Looking at the current examples it looks like they are created the same way and used the same way. One difference is api routes have routing, are there others?
continuing-cyan
continuing-cyan8/28/2024

Make Client Only component with SSR

Is there a way to make a component client only. In this example the use of localStorage throws an error during SSR. ```typescript import React from "react"; import { Button } from "@/components/ui/button";...
plain-purple
plain-purple8/26/2024

Automatically SSG

https://tanstack.com/router/latest/docs/framework/react/start/static-prerendering According to the document, @tanstack/start needs manually configuration for SSG. Can it be done automatically like NextJS in the future?...
genetic-orange
genetic-orange8/26/2024

TRPC Integration?

What's the best way for a TRPC user to migrate over? It seems like I should be able to wrap up the precedures in server actions, but I'm not sure how to cover hydration/dehydration in an SSR pass. Is there a recommended approach? (This may be incomplete/upcoming in which case I'm happy to collaborate with others on this)...
manual-pink
manual-pink8/24/2024

HMR not working properly

Hi, when i update my index.tsx to see changes in code i need to manually refresh the page: ```tsx import { createFileRoute } from '@tanstack/react-router' import { Component } from '~/components/test' import data from '../../characters.json' export const Route = createFileRoute('/')({...
foreign-sapphire
foreign-sapphire8/23/2024

ClerkProvider + QueryClientProvider doesn't work?

I was following the start-clerk) repo and wanted to add React query to it as well but noticed that they don't mesh together well. I have the following: ```tsx export const Route = createRootRouteWithContext<{ queryClient: QueryClient;...
adverse-sapphire
adverse-sapphire8/1/2024

Router Context + StartClient/Server

Is it currently possible to pass root router context (from React contexts) into the client or server components (or somewhere else)?
absent-sapphire
absent-sapphire7/29/2024

Environment variables

What's the intended method to access environment variables in Start in isomorphic code like createRouter? (import.meta as any).env.VITE_MY_URL works on the client and server and import.meta.MY_URL and process.env.VITE_MY_URL don't.
absent-sapphire
absent-sapphire7/29/2024

Is a single router created for a given SSR pass?

I have state global to a render (but not module-global, I don't want other requests to use it) that I want to share between suspense boundaries, nested routes, and anything else that might correspond to a single initial page load SSR. My state happens to be a timestamp: I'd like to pass each server-side fetch() call a shared header so an API server knows these requests are coming from the same overall backend request....
quickest-silver
quickest-silver5/20/2024

Help needed with Tanstack Query for Vue

I'm trying to make a demo of a simple app with optimistic update but I can't make the mutation showing as pending in another component from where the mutation was triggered. For example I have users list and add users page when I trigger the mutation inside the Add User component and try to listen to the same mutation inside UsersList the mutation shows as idle even though it's mutating in the background. I wrapped the pending state inside a computed property, I'm using Vue3 Composition API with Tanstack Query version: 5.27.5...