-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Link makes checksum incompatible #528
Comments
Just wondering.. could it be that you have two different versions of React loaded alongside, one from your app and another in |
I'll check and update here... thanks for the lead! |
Nope. react-router is using the version of react I've loaded in my project: 0.12.x Other suggestions? |
Any other suggestions? |
If you share an example, I can take a look! |
Sure, no problem! My project metaphorical.ly uses react-router. Here is where I invoke the "overwrite" of the server-produced content: If I switch just one of these links to Link, I get a checksum error: I can provide more info if needed! If you want to run this yourself, just run |
@clintandrewhall, once I got this error because the client was rendering the |
I'm doing plenty of isomorphic stuff right now and have not seen this, I'll happily reopen if a test case showing the bad behavior shows up :) |
woops, missed the sample code |
If you're doing server side rendering, you need to be using Router.HistoryLocation. I'm sure your checksums are busted because of If there's a valid reason to use |
@rpflorence Sorry, what do you mean when you say use Router.HistoryLocation? |
in the client you need to use |
@clintandrewhall Were you able to fix the problem with that Ryan commented or did something else? I'm having the same issue but didn't quite get the way to solve it. |
I have the same issue. Anyone can help on resolution? thanks |
I've stumbled on this thread because my checksum isn't matching. Debugging it a few different ways I think the issue is that a Has anyone else seen this issue? |
I'm also seeing a @anatomic Did you find a solution? |
@jarib I did, posted my solution in issue #1402 #1402 (comment) |
I'm experimenting with isomorphic rendering with react-router, and everything has been going great until I tried to add the Link component. Now I get:
Uncaught Error: Invariant Violation: You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side.
If I don't include the Link component, the checksum matches; include even just one and it doesn't. Any ideas what might be causing this?
The text was updated successfully, but these errors were encountered: