TanStackT
TanStack11mo ago
2 replies
then-purple

How to differentiate `/blog/$page` from `/blog/$slug` (where page is numeric)

In SvelteKit, I use a param matcher. If it matches, it loads. If not, it falls back to another less specific route. If none, it 404's.

Is similar possible in TS Start? I don't see it documented in TSS or TSR, where only the type or pattern of the param differs.

I'm using a mix of file & flat routes.
    "@tanstack/react-query": "^5.68.0",
    "@tanstack/react-router": "^1.114.23",
    "@tanstack/react-router-with-query": "^1.114.23",
    "@tanstack/react-start": "^1.114.23",
Screenshot_2025-03-18_at_2.39.33_PM.png
Was this page helpful?