-
There are two paths in routes
At this point, the expected behaviour is as follows
With that in mind, the actual behaviour when requesting
What can I do to get the expected behaviour? Versions "dependencies": {
"@remix-run/node": "^2.8.1",
"@remix-run/react": "^2.8.1",
"@remix-run/serve": "^2.8.1",
},
"devDependencies": {
"@remix-run/dev": "^2.8.1",
}, |
Beta Was this translation helpful? Give feedback.
Answered by
kiliman
Apr 11, 2024
Replies: 1 comment 1 reply
-
You're right. It appears to be a bug in the route matching. My understanding is that static segments like So the URL Here's a repro: https://stackblitz.com/edit/remix-run-remix-h3nrmh?file=app%2Froutes%2F%24username.posts.tsx |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
uttk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're right. It appears to be a bug in the route matching. My understanding is that static segments like
api
have higher precedence over a path param.So the URL
/api/posts
should always prefer/api/*
over/:username/posts/
Here's a repro:
https://stackblitz.com/edit/remix-run-remix-h3nrmh?file=app%2Froutes%2F%24username.posts.tsx