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

inland-turquoise
inland-turquoise11/22/2022

How to add base_path to router?

I have a common prefix in all the urls. basically electron add main_window before the routes. Example: http://localhost:3000/main_window/ is the base url. How can I have this as the base url?...
inland-turquoise
inland-turquoise11/22/2022

Type definitions only showing root path

Type definitions for router.navigate only show '/' as valid option. Meanwhile the code for router creation is: ```ts const ROUTES = {...
fair-rose
fair-rose11/21/2022

Routes declaration convention

I've seen the examples with 0.0.1-beta.25 Is this the recommended pattern? 1. Create a new route config object with createRouteConfig 2. Create new children objects using root object with .createRoute...
equal-aqua
equal-aqua11/19/2022

search prop is required in Link?

I got the TS error in the image but I did not expect that. Here is my code: ```ts const routeConfig = createRouteConfig().createChildren((createRoute) => [ createRoute({...
No description
complex-teal
complex-teal11/17/2022

Any way to do a partial or fuzzzy match

I have these paths "/" | "/app" | "/app/books" | "/app/books/create" My sidebar has 2 links. the "Home" one which points to /app and a books one which points to /app/books I want to match "/app/books/create" to the /app/books link but not the /app link...
genetic-orange
genetic-orange11/17/2022

Typescript error when extracting param matches when param is on the root route

I see Property 'accountId' does not exist on type 'Record<never, string> when using this param on the root route. I might just be using it wrong though. The param does exist at runtime, so it is found correctly. Here's the stackblitz https://stackblitz.com/edit/tanstack-router-mkgsih?file=src/main.tsx...
rare-sapphire
rare-sapphire11/15/2022

Location internal state

In react-router-dom, I've used a pattern when handling authenticated pages which allows me to redirect to a login page, and then back to the original page attempting to be accessed, using the location state. From reading the tanstack code, it seems not to have the same kind of internal state. Is the expectation that I should store this kind of state in React context, or somewhere else, vs in the location?
rare-sapphire
rare-sapphire11/14/2022

Serialised loaders

What is the new way to wait for a parent route loader to finish it's promise and use its result in a loader in a child route?
helpful-purple
helpful-purple11/9/2022

Authentication & Authorization in Routes

Any example of good practices to deal with authentication routes? Option 1: Wrap the element with a Auth component which handles the authentication on the client side. e.g fetch the user and if it return erros redirect to login. Option 2: Create a parent route that has an action or loader which tries to fetch the user before it's loaded and do the redirect there?...
national-gold
national-gold11/4/2022

history.back() isn't working also the browser back and forward buttons are disabled

```js const location = new ReactLocation(); <Router location={location} routes={[...
No description
quickest-silver
quickest-silver11/4/2022

useMatch not working as expected

It always returns ``` id: "root" isLoading: false ownData: {}...
helpful-purple
helpful-purple10/29/2022

Helper to extract type definitions of possible route paths, url.

Hello, the typesafety of the route is awesome. Do we have any helper to extract the possible paths from the router objects?
No description
continuing-cyan
continuing-cyan9/28/2022

npm install tanstackrouternot working

@tanstack/router installation is not working it says: "Not found" is it released or do we need to wait?
npm install @tanstack/router --save
npm install @tanstack/router --save
...