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

Consistent Class Names on Server and Client? #10

Open
jupl opened this issue Feb 16, 2017 · 2 comments
Open

Consistent Class Names on Server and Client? #10

jupl opened this issue Feb 16, 2017 · 2 comments

Comments

@jupl
Copy link

jupl commented Feb 16, 2017

I like that this library works on both server and client side. Yesterday I've been messing around with universal rendering using Rum and like that I can get styles generated on the server and client. The only issue right now that I'm having is because the names are slightly different on the server and client I get a React warning where because things don't match up I lose the server rendering benefits:

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) class="container--G__40510"
 (server) class="container--G__12410"

I'm wondering if there could be an approach to get consistent class names.

@tokenvolt
Copy link

@jupl I faced the same issue, did you manage to find a solution?

@gacelita
Copy link

@jupl @tokenvolt Please tell me if my pr solves your problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants