Skip to content
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

Static router produce double slash #4480

Closed
diondirza opened this issue Feb 7, 2017 · 2 comments
Closed

Static router produce double slash #4480

diondirza opened this issue Feb 7, 2017 · 2 comments

Comments

@diondirza
Copy link

Version

4.0.0-beta.5

Test Case

Use it on isomorphic react app

Steps to reproduce

using StaticRouter without basename props
<StaticRouter location={request.url} context={routerContext}>
and have Link with prop to /home
<Link to={'/home'}>

Expected Behavior

Render result:
<a href="/home' />

Actual Behavior

Render result:
<a href="//home" />

I got this warning from my client console when I upgrade to latest beta,

Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) href="/home" data-reactid="21
 (server) href="//home" data-reactid="21

and lead me to find this culprit.

@PEM--
Copy link

PEM-- commented Feb 7, 2017

Confirmed for me as well.

@pshrmn
Copy link
Contributor

pshrmn commented Feb 7, 2017

Fixed in #4484

@timdorr timdorr closed this as completed Feb 7, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants