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

[LeftNav] Server-side React render was discarded. (React 0.14.1) #2077

Closed
tthew opened this issue Nov 6, 2015 · 7 comments
Closed

[LeftNav] Server-side React render was discarded. (React 0.14.1) #2077

tthew opened this issue Nov 6, 2015 · 7 comments
Labels
bug 🐛 Something doesn't work

Comments

@tthew
Copy link

tthew commented Nov 6, 2015

Dropping in the LeftNav and rending server side causes React (0.14.1) to discard the server side render and throw the following warnings;

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) xed;z-index:10;left:0;top:0;transform:tr
 (server) xed;z-index:10;left:-266px;top:0;transfo

Server-side React render was discarded. Make sure that your initial render does not contain any client-side code.

Looks like something to do with positioning. Why would I be seeing different results for client / server?

I'm running the latest from master. We're currently maintaining our own fork over here; https://github.com/ehealthafrica/material-ui

@tthew tthew changed the title LeftNav: Server-side React render was discarded. LeftNav: Server-side React render was discarded. (React 0.14.1) Nov 6, 2015
@tthew tthew changed the title LeftNav: Server-side React render was discarded. (React 0.14.1) [LeftNav] Server-side React render was discarded. (React 0.14.1) Nov 6, 2015
@oliviertassinari
Copy link
Member

#2007 should have fix this. @Cavitt any idea what's going on?

@TheUltDev
Copy link
Contributor

@oliviertassinari Prefixing isn't the source of the issue so #2007 wouldn't fix this.

Somehow the left attribute is different. I'll take a look when I can, I have to implement the LeftNav soon so I'll probably run into it.

@oliviertassinari
Copy link
Member

Oh, my bad, it's the left property that differ. It's definitely not linked to the autoprefixer.
Here is the culprit https://github.com/callemall/material-ui/blob/master/src/left-nav.jsx#L135.
And it's related to #1269.

@oliviertassinari
Copy link
Member

@tthew I think that we should revert #1269. And, following my last comment on the PR, use translate2d when translate3d is not supported.

@alitaheri alitaheri added the bug 🐛 Something doesn't work label Dec 9, 2015
@hourliert
Copy link

Same issue here. 👍 for @oliviertassinari proposal.

@TheUltDev
Copy link
Contributor

@oliviertassinari that would make a great prefixer plugin for rofrischmann/inline-style-prefixer

@oliviertassinari
Copy link
Member

This was fixed. I have forgotten to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

5 participants