Replies: 2 comments 2 replies
-
any updates ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I'm trying to redirect from my index page to my splat page, but that seems to just not do anything. I get stuck on my app's loader, and neither of the page's import { Route as SplatRoute } from "./foo.$";
export const Route = createFileRoute("/foo/")({
beforeLoad: async () => {
throw redirect({
to: SplatRoute.fullPath,
params: { _splat: "" },
});
},
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am familiar with this type of file-based route from Next.js:
pages/sign-up/[[...index]].ts
. It matches both/sign-up
and/sign-up/anything
.The only way I've found to replicate this in TanStack Router is having two separate files:
/sign-up/$.tsx
and/sign-up/index.tsx
. Is there a way to do it with a single file based route?Beta Was this translation helpful? Give feedback.
All reactions