Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect Option Segments docs #6317

Closed
1 task done
siffogh opened this issue May 5, 2023 · 1 comment
Closed
1 task done

Incorrect Option Segments docs #6317

siffogh opened this issue May 5, 2023 · 1 comment

Comments

@siffogh
Copy link

siffogh commented May 5, 2023

What version of Remix are you using?

1.16.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Create a Remix app with the following routing structure:

app/
├── routes/
│   ├── ($lang)._index.tsx
│   ├── ($lang).$productId.tsx
│   └── ($lang).categories.tsx
└── root.tsx

Expected Behavior

/american-flag-speedo matches ($lang).$productId.tsx.

Actual Behavior

/american-flag-speedo matches ($lang)._index.

  1. If this is an expected behaviour, then it should be reflected on the Optional segments docs
  2. Also, it's a bummer because then there's no way to have localisation AND dynamic segments at the root path unless you handle this logic outside of routing 😔. I guess that's why Hydrogen's demo store places dynamic pages under the pages path (which is super unrealistic for most websites).
@siffogh
Copy link
Author

siffogh commented May 5, 2023

Closing since I found this

@siffogh siffogh closed this as completed May 5, 2023
ramiroazar added a commit to ramiroazar/remix that referenced this issue Jul 18, 2023
…l segment

As outlined in the following issues, this route is not matched as stated in the documentation.

Whether this is a bug with remix instead still seems up for discussion.

I think this should actually work as currently documented, but it doesn't and this seems known for a while, so this change is just reflecting the current implementation.

remix-run#6021
remix-run#6317
remix-run#6426
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant