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

like-gold
like-gold6/30/2023

Can't find the docs for useMatchRoute

https://tanstack.com/router/v1/docs/api/react/useMatchRoute I am currently using "@tanstack/react-location": "^3.7.4" and I noticed that the original documentation is nowhere to be found. So, I looked to the current documentation, and it seems to be blank. Where can I find the docs for this?...
flat-fuchsia
flat-fuchsia6/25/2023

Async validateSearch?

I have dynamic search validations that I would like to pull via API. Is there a idiomatic way to do this in this router?
flat-fuchsia
flat-fuchsia6/25/2023

How can I use the URL to open a modal?

Is there a way to change the URL without trigger a new page load? I am trying achieve deep linking within a given component where the UIs will change according to the URL.
absent-sapphire
absent-sapphire6/23/2023

Loading component?

Hi yall, sorry if this is covered, but I can't seem to find this in the docs: Is there a way to have a loading component, like how errorComponent key exists in Route? ``` const searchContentRoute = new Route({...
optimistic-gold
optimistic-gold6/14/2023

bug when using basepath?

I have this: <RouterProvider router={router} basepath=“app” history={history} /> Where history is a custom tanstack brwserhistory instance. Every time I do...
flat-fuchsia
flat-fuchsia6/14/2023

How do I show the index page when there are no route params?

I want to setup something like this: /posts -> index /posts/1 -> show ...
afraid-scarlet
afraid-scarlet6/1/2023

Child route `loader` is executed before parent route `loader` is completed

I have two routes, parent and child, both of them have loader async function. For some reason, the loader execution starts on the parent route, but when there's an async operation, it starts to execute the child loader function. This is obviously not the behavior I expected to. Is that intended? Is that an open bug? Or it happens only on my environment somehow?...
fascinating-indigo
fascinating-indigo5/25/2023

Quick noob question

Is tanstack router (https://tanstack.com/router/v1) the continuation of React location (https://react-location.tanstack.com/) ? I did some googling and chat-gpt-ing but could not come to a satistying conclusion. If they are not the same, what is the difference? According to chat-gpt, tanstack router does SSR where react location is client side routing only... (?)...
genetic-orange
genetic-orange5/16/2023

Split router tree into multiple files

Is there any way to split the routerTree into multiple rootRoutes? We have a large application and this would mean that the whole routing tree has to be in one place and cant be split. I have tried to split it but it breaks the typesafety of the router. Any tips or ideas?
robust-apricot
robust-apricot5/12/2023

pendingComponent - not rendered

Hey folks, Before creating an issue, I kinda want to check if I'm just doing something wrong on my end: I'm on beta.86, trying to get a loading spinner to render while my loader is loading. Added the pendingComponent to my route but nothing is rendering while it loads. What I tried: - Add wrapInSuspense: true|false to itself and higher level routes...
absent-sapphire
absent-sapphire5/11/2023

Have to click twice to navigate with Link

Hi all, I would like to try Tanstack routing and I followed the official sample. It works, but I have to click twice on the Link to let the page load the right content: ```typescript import React, { StrictMode } from 'react' import ReactDOM from 'react-dom/client'...
optimistic-gold
optimistic-gold4/12/2023

How to make path not overwrite parent path from express.

When the site is visited you are sent to /admin witch is right, but the content for /admin's index page does not show. When I then click on the FAQ page the path should be /admin/FAQ but it is replaced with /FAQ. Then when the home page is clicked the content is shown but it looks like it is on / and not the index of /admin. ...
No description
fascinating-indigo
fascinating-indigo4/10/2023

How to implement dynamic routes?

Hey I'm wondering how I would implement dynamic routes. I looked at some GitHub Discussion and found a Discord threat but it seems to not work for me. I want to have a / index page and /issue/$id pages. /issue should just show a 404 page for now. The index page was easy to implement, but I'm unsure how I implement the dynamic issue route. In my issue.tsx file I have an issue TSX component and a not found component. I then created these two routes: ```TS export const issueBaseRoute = new Route({ getParentRoute: () => rootRoute,...
ambitious-aqua
ambitious-aqua4/9/2023

use with NextJS /Remix etc?

I've been wanting for ages to have a nice / type safe search params api / state management solution. I've been getting quite excited about what Tanstack router promises, however after some hacking around can't seem to get it to work with NextJS. Obviously(!?) this is a replacement for NextJS etc, but I wonder if there's a way or a plan to allow this to work along side frameworks like these in the future?
conscious-sapphire
conscious-sapphire3/31/2023

history implementation

What's the reason that the implementation of history.ts sets the href to be ${pathname}${hash}${search} rather than ${pathname}${search}${hash}? https://github.com/TanStack/router/blob/beta/packages/router/src/history.ts#L157...
stormy-gold
stormy-gold3/25/2023

How to handle hash from Link component

Hi guys, maybe someone can tell me how to handle hashes from Link hash prop? I didn't find any event for it. I'm using react-router beta 83
No description
inland-turquoise
inland-turquoise3/15/2023

"?" query missing on the anchor in Link component

I'm using the following code to render links in my sidebar to navigate in my webapp: ```tsx // Scenario: User is currently on http://localhost:4200/schichten?company=GHT export const SidebarItem: FC<SidebarItemProps> = ({ href, title, svg }) => {...
No description
conventional-tan
conventional-tan3/12/2023

Routing when vite.config.ts is set to something other than '/'

Hello, I am having trouble to get the router working properly when I set the base in vite.config.ts to e.g. '/foo'.
Is the base considered inside inside the router or do I have to set something up?...