We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6.5.0-pre.1
Reproduction demo: https://stackblitz.com/edit/github-kmv8on-hr7pvh?file=src/App.tsx
Attempt 1, path becomes /food/snacks/fruit/apple?/apples (with the ?) and wrong page is shown
/food/snacks/fruit/apple?/apples
?
<Link to={generatePath('food/:foodName/fruit/:fruitName?/apples', { foodName: 'snacks', fruitName: 'apple', })} > Apples (generatePath) </Link>
Attempt 2, throws error Missing ":fruitName" param
Missing ":fruitName" param
<Link to={generatePath('food/:foodName/fruit/:fruitName?/apples', { foodName: 'snacks', 'fruitName?': 'apple', })} > Apples (generatePath) </Link>
Should had returned /food/snacks/fruit/apple/apples
/food/snacks/fruit/apple/apples
Returns /food/snacks/fruit/apple?/apples
The text was updated successfully, but these errors were encountered:
This is released in a 6.6.3-pre.0 prerelease if you want to give it a shot. Should have a stable out probably early next week
6.6.3-pre.0
Sorry, something went wrong.
@brophdawg11 Quick test seems to work https://stackblitz.com/edit/github-kmv8on-xzfgau?file=src/App.tsx
Released in 6.7.0
6.7.0
Successfully merging a pull request may close this issue.
What version of React Router are you using?
6.5.0-pre.1
Steps to Reproduce
Reproduction demo: https://stackblitz.com/edit/github-kmv8on-hr7pvh?file=src/App.tsx
Attempt 1, path becomes
/food/snacks/fruit/apple?/apples
(with the?
) and wrong page is shownAttempt 2, throws error
Missing ":fruitName" param
Expected Behavior
Should had returned
/food/snacks/fruit/apple/apples
Actual Behavior
Returns
/food/snacks/fruit/apple?/apples
The text was updated successfully, but these errors were encountered: