You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described here: https://nextjs.org/docs/api-reference/next/link#with-url-object You can give the href attribute query parameters and it will construct a url with ?parameter=value. It would be handy if next could create for routes that have parameters like /[slug]/[...parameters] the routes themself from query parameters with the same name.
Is your feature request related to a problem? Please describe.
At the moment you have to construct paths for links your self. Have to handle trailing slashes hashes and query parameter. While the other way around parameters in the path get already parsed into the query object.
could lead to the url /awesome/feature/that/makes/live/easier. All other query parameter that don't match in the pathname would be passed through as usual.
Describe alternatives you've considered
One could also put it in a separate field and don't mix it with the query object, but next js does it the other way around already, that's why I would consider doing it the same way in this direction as well.
Thank you for your awesome work.
The text was updated successfully, but these errors were encountered:
This corrects/makes sure interpolating dynamic route values for `href` works correctly. This provides an alternative approach to building the `href` value with `next/link` so that you don't need to worry about encoding the params manually.
Closes: #13473Closes: #14959Closes: #16771
This corrects/makes sure interpolating dynamic route values for `href` works correctly. This provides an alternative approach to building the `href` value with `next/link` so that you don't need to worry about encoding the params manually.
Closes: vercel#13473Closes: vercel#14959Closes: vercel#16771
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 29, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature request
As described here: https://nextjs.org/docs/api-reference/next/link#with-url-object You can give the
href
attribute query parameters and it will construct a url with?parameter=value
. It would be handy if next could create for routes that have parameters like/[slug]/[...parameters]
the routes themself from query parameters with the same name.Is your feature request related to a problem? Please describe.
At the moment you have to construct paths for links your self. Have to handle trailing slashes hashes and query parameter. While the other way around parameters in the path get already parsed into the query object.
Describe the solution you'd like
Example:
could lead to the url
/awesome/feature/that/makes/live/easier
. All other query parameter that don't match in thepathname
would be passed through as usual.Describe alternatives you've considered
One could also put it in a separate field and don't mix it with the query object, but next js does it the other way around already, that's why I would consider doing it the same way in this direction as well.
Thank you for your awesome work.
The text was updated successfully, but these errors were encountered: