react-router icon indicating copy to clipboard operation
react-router copied to clipboard

[Bug]: optional segments with dynamic segments

Open WeiShengv99 opened this issue 1 year ago • 1 comments

What version of React Router are you using?

@6.26.1

Steps to Reproduce

image

Expected Behavior

matchPath('/one/:mode?/two',`/onexmode/two`)

should return null

Actual Behavior

return matched

WeiShengv99 avatar Aug 16 '24 13:08 WeiShengv99

image But in doc image

WeiShengv99 avatar Aug 16 '24 14:08 WeiShengv99

To align with our new Open Governance model, we are now requiring that all issues have a minimal and runnable reproduction. To that end, we're doing some housekeeping in the repo to clean up existing issues that do not have a valid reproduction. This should get us down to a more manageable number of issues and allow us to be more responsive to existing and newly filed issues.

We're using a Github actions script to identify issues without a reproduction by looking for a StackBlitz, CodeSandbox, or Github link in the issue body. This won't be perfect, so if this issue has a reproduction on another platform, please comment back on here and we can re-open the issue. Similarly, if there's a reproduction buried in a comment, please move the link into the description and comment back. Please tag @brophdawg11 or @brookslybrand in your comment so we get a notification as well 🙂.

If this issue did not have a reproduction but is still valid, or if you wish to start with a fresh issue, please create a new issue with a fresh reproduction against v7 and link to this issue in the new description.

If this a feature request, please open a new Proposal Discussion in React Router, and if it gets enough community support it can be considered for implementation.

If you have any questions you can always reach out on Discord. Thanks again for providing feedback and helping us make React Router even better!

github-actions[bot] avatar Jun 25 '25 19:06 github-actions[bot]