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
href()
*
href() util doesn't replace splat (*)
react-router 7.2.0
npm
href("/foo/*", { "*": "bar" }) // "/foo/bar"
href("/foo/*", { "*": "bar" }) // "/foo/*"
The text was updated successfully, but these errors were encountered:
Have you tried href("/foo/*", { "*": ["bar"] })? A splat route param value is always an array (each value is a path segment)
href("/foo/*", { "*": ["bar"] })
Sorry, something went wrong.
Thanks for the suggestion, though that doesn't work either. The current implementation only replaces dynamic segments starting with a :. https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/href.ts#L32
:
pcattori
No branches or pull requests
I'm using React Router as a framework
Reproduction
href()
util doesn't replace splat (*
)System Info
Used Package Manager
npm
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: