Skip to content

How can I use Dynamic Segments and Splat Routes together? #9224

Closed Answered by kiliman
uttk asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uttk
Comment options

Answer selected by uttk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants