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
Loader Navigation
Global loading state
What's the recommended order of operations when using data loading and state management?
Tanstack Router Conditional Rendering
Error when building app, Routes are not found
404 not found
404 not found
Nested routes with folders in file based routing
Naming convention for router
edit.tsx
page and the $id.tsx
page should both be children pages of the users.tsx
page. Since that page controlls where they are headed towards when checking for a specific user in the table.
Also it's starting to feel like I have missed something when I read the Route Tree & Nesting(https://tanstack.com/router/latest/docs/framework/react/guide/route-trees) guide on the website. To me it feels like a have created a mixture between both the flat routes choice and the directory choice and need some help changing this....
Support for nested dynamic routes?
/
- /base
I want to be able to serve my app either from root or from /base
. Can this work with tanstack router? I know dynamic routes are a thing, but if I were to use $base
it would not catch the root route...How to make a unit testing helper?
useParams
are not returning expected results, so I can tell I'm not getting it totally right.
The issue seems to be that the params
object is returning a key of **
instead of workflowId
, although the value for the param is actually right.
I've created a basic reproduction in StackBlitz @ https://stackblitz.com/edit/vitejs-vite-5wm5gn?file=src%2FWorkflows.spec.tsx. You can run the tests via npm run test
in the terminal....
Base URL case sensitive
Redirecting when validateSearch fails
validateSearch
, so that the search params type will always be { email: string }
(i.e. email is never null
or an invalid email address).
The schema is using strict validation with no default or fallback value, so an error will be thrown if it fails to parse. Ideally, I would like to redirect to a different page if the validation fails, without ever rendering the route component (so that if the route component does get rendered, it can be safely assumed that the search param is valid), but I'm unsure about the best way to achieve this....Layout for dynamic params

Need to refresh manually when using tailwind with rsbuild
Infinite rerenders with preload of 'intent' on data table
List-Detail Layout with Path Params
Undefined context with useRouteContext
useRouteContext
hook coupled with validateSearch
in a nested route that throw an error in a specific situation.
In my application, there is an _auth
route that ensure, in the beforeLoad
method, that the user is logged in, returns his account's information if he is or redirects him to the login page if he's not....
Handle 404 from a component query
__root.tsx
that queries the api. When it works, it works, but I am having trouble in the context of this file based router to figure out what to do when it 404s. This one data fetch in turn runs the entire ui and every query afterwards, so the ui won't work if that one request fails. Ideally I'd like to just display an error component, or reroute to one in theif (isError) {...}
if (isError) {...}
type inferred incorrect on getRouteApi or useSearch({ from: '/some/route/path' })

Meta works on lazy routes despite TS screaming

Two routes one page (optional parameter)
whatever/ID/SECOND_ID
where they both point to the same page but the SECOND_ID
is optional? So even if you just put whatever/1
instead of whatever/1/2
it still match the same page