Replies: 2 comments 3 replies
-
Don't tag me bro.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Not really. You could handle this yourself using the Or you could parse it in the // src/routes/$userId.tsx
export const Route = createFileRoute('/$userId')({
beforeLoad: ({ params: { userId } }) => {
return { userId: customParseFunction(userId) }
},
loader: ({ context: { userId } }) => loadUser(userId)
})
// src/routes/$userId.foo.tsx
export const Route = createFileRoute('/$userId/foo')({
loader: ({ context: { userId } }) => loadFooDataForUser(userId)
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to migrate from React Router for a fairly large project because TanStack Router has been such a pleasure in other projects.
But, I need to support routes with a leading '@' (similar to tik tok or instagram a couple of years ago). I can't quite figure out how to do this in TS Router. Is it possible?
Sample routes:
/@bob
/@alice
/@etc..
but then support "conventional" routes like:
/events
/event/$eventId
Is this possible? What would be the best approach?
Beta Was this translation helpful? Give feedback.
All reactions