-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
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
StaticRouter includes leading slash #5488
Comments
The The bug is in our In the short term, if you switch from |
Would the fix here be to introduce a second check |
`react-router` has a bug where a `<Link />` with just a query parameter in the `to` prop is treated like an absolute link, but only on the server by the `StaticRouter`. This works around the issue by transforming `<Link to="?thread" />` to `<Link to={{ search: "?thread" }} />`. Reference issue: remix-run/react-router#5488
I think that we should be using the I should have a PR up shortly. I'm taking this opportunity to finally have the |
Opened #5489 |
Version
react-router
v4.2.0react-router-dom
v4.2.2Steps to reproduce
Server-side render a
react-router
app with a<Link to="?some=query" />
.Expected Behavior
It should generate the same anchor tag HTML on the server as on the client.
Actual Behavior
Any ideas why this is happening? I'm stumped. Tried including a different/empty
basename
on client and server but it's still there. Maybe related to #5127, but it's not a relative link is it?The text was updated successfully, but these errors were encountered: