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
Importing generated router file causes nitro startup error
apply/set search param in component.
getRouteApi().useParams() infers non-nullish value "{}" as type
getRouteApi().useParams()
the return value includes the correct params but also {}
(twice).
It works fine when using route.useParams()
or useParams({ from: "/about/$name")
.
Did I something wrong?
Repro: https://stackblitz.com/edit/tanstack-router-qc3zv7?file=src%2Fmain.tsx...is there anything like useActionData() in tanstack router?
Any strategy for authenticated routes as the default instead of unauthenticated?
_auth/
+ _auth.tsx
to create protected routes (or _auth.whatever.tsx if you're doing the flat thing) which works fine but it feels a bit weird if majority of your routes are auth.
There's a hypothetical situation that someone has 20 protected routes and 1 unprotected route. In this situation it would feel bad to just have one layer of nesting whether it's in a file name or nested folder for your default case.
Is there a better way to do this? My brain might be fried but I can't think of anything at the moment....Typescript error at useNavigate with params

Context-based authentication
isLoggedIn
is changing (with a useEffect
much like the one in InnerApp
below, but obviously in the context itself ). However, although InnerApp
is subscribed to the auth context, it never picks up on the change.
It seems I can't use router.invalidate()
inside of the context itself without running into errors about the Router context being undefined, but I am running it inside of the Login
component when a user successfully logs in. In other words, the router context should be refreshed since it is invalidated on Login (or Logout). ...General Navigation with Previous Search
``tsx
// product: 'apple' | 'banana' | 'orange'
const navigate = useNavigate({from:
/fruits/${product}`})
//......providing an action in file-based routing (createFileRoute)
createFileRoute
accepts an action
(at least the intellisense/TS defs indicates that it doesn't):
```ts...What is the type of the parameter passed to the load function in createFileRoute?
Getting proper `Link` types for own components?
createLink()
, thanks for the great work!
We have a few different button components, e.g. PillButton
, FlatButton
, etc. and it supports a tag
prop that can be set to any component which will be used to render the button. We've been using it by passing a link:
```tsx...Suspended queries in route
authenticated routes approach

TanStack Start with SPA
Loader doesn't get router context
skip files during routetree generation
Is there a way to have Rewrites or Proxy?
Client headers do not get passed to API routes called in loader/beforeLoad {TanStack Start}
getHeaders()
function to pass the headers to the fetch call.
```ts...Clerk Setup with authenticated routes
Automatic Code Splitting with separate component file.