Catch-all as a fallback in app router #84455
Unanswered
jackhugh
asked this question in
App Router
Replies: 0 comments
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’ve run into something with the App Router that doesn’t seem possible, even though it worked fine with the Pages Router.
Example setup:
/[segment]/[...slug]/page.tsx
/[...slug]/page.tsx
The problem is that in the App Router, Route A always takes priority. That means any path matching
/*/*
is intercepted by Route A - even if I haven’t declared that route ingenerateStaticParams
and have setdynamicParams = false
.What’s even stranger is that Route B does intercept the route on the very first load after starting the server, but will use Route A subsequently (until the server is restarted).
Beta Was this translation helpful? Give feedback.
All reactions