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

Page reloads on first 'Link' click with SSR #4512

Closed
nicksrandall opened this issue Feb 10, 2017 · 6 comments
Closed

Page reloads on first 'Link' click with SSR #4512

nicksrandall opened this issue Feb 10, 2017 · 6 comments

Comments

@nicksrandall
Copy link

Version

4.0.0

Test Case

Hard to produce Test Case because deals with SSR.

Steps to reproduce

I'm using StaticRouter to render on the server and BrowserRouter on the client and everything seems to be working great other than the fact that the first time that I click on a Link, my page is doing a full reload. After that first reload, everything works as expected and any subsequent link clicks do not cause a full page reload. It appears that when the server renders an a tag (from a Link component), the browser is treating it as a normal a tag and not a special one that doesn't cause a refresh.

Expected Behavior

I would expect no page refresh.

Actual Behavior

A page refresh on first click.

@nicksrandall
Copy link
Author

@timdorr
Copy link
Member

timdorr commented Feb 10, 2017

This sounds like something outside of the library. Do other React components behave as expected? It sounds like React isn't plugging into the HTML-provided DOM on boot.

Any console errors?

You can provide a test case by simply sharing your repo where you're working on this.

@nicksrandall
Copy link
Author

All react components behave as expected and there is no errors in the console (even in dev mode). I am unable to share my repo because it is private but the related issue says it has a reproducible example.

@nicksrandall
Copy link
Author

I will continue to investigate and see if I can come up with a small repo to show issue.

@nicksrandall
Copy link
Author

@timdorr you suspicions were correct. It was an issue with how I was using async scripts and react wasn't being loaded as fast as I needed it to. Closing.

@kulikalov
Copy link

@nicksrandall have you solved the issue with react-isomorphic-starterkit ? If so, could you, please, describe your solution?

@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

3 participants