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

SSR warning due to different checksums on client and server #40

Closed
vladejs opened this issue Jun 22, 2016 · 5 comments
Closed

SSR warning due to different checksums on client and server #40

vladejs opened this issue Jun 22, 2016 · 5 comments
Assignees
Labels
Help Wanted Orphaned and discontinued issues that need your help Type: Bug Bug reports and their fixes

Comments

@vladejs
Copy link

vladejs commented Jun 22, 2016

I am using Flow Router SSR, when using an <AutoForm> component I get this error on browser console:

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) tid="4"><label for="bbp70g2bm510khqp" cl
 (server) tid="4"><label for="ne1wrgd9mjrcz0k9" cl

Any ideas on how to tackle this?

@radekmie radekmie added the Type: Bug Bug reports and their fixes label Jun 22, 2016
@radekmie radekmie self-assigned this Jun 22, 2016
@radekmie
Copy link
Contributor

Ha! It's because every field receives an id - given or random. I don't really know, what to do about it... Any ideas?

@radekmie radekmie added the Help Wanted Orphaned and discontinued issues that need your help label Jun 22, 2016
@radekmie
Copy link
Contributor

Here is related React issue.

radekmie added a commit that referenced this issue Jun 23, 2016
@radekmie
Copy link
Contributor

radekmie commented Jun 23, 2016

I've fixed it on devel branch. It would be great if you could test it and let me know, if it works correctly.

@vladejs
Copy link
Author

vladejs commented Jul 18, 2016

Awesome, i haven't tested yet, but I indeed that's a react issue.
How did you fixed it?
Currently Iam seeing the same warning in my SSRed page and components which doesn't have forms.

@radekmie
Copy link
Contributor

Well, basically it works like this - every form has it's own id generator and share it to all it's fields, so every form and every field has guaranteed id (of course provided custom id is respected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Orphaned and discontinued issues that need your help Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants