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

Auto-prefixing breaks server-side rendering with "checksum mismatch". #749

Closed
MrOrz opened this issue Jun 4, 2015 · 1 comment
Closed
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.

Comments

@MrOrz
Copy link

MrOrz commented Jun 4, 2015

When material-ui is used in isomorphic websites, the following warning is found in the 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) ght:24px;width:24px;-webkit-user-select:
 (server) ght:24px;width:24px;user-select:none;fil

It seems that the auto-prefixing module breaks server-side rendering because browser prefix is only prepended in the browser and not on the server.

A plausible way to fix this, mentioned in FormidableLabs/radium#128 (comment), is to provide autoprefixer with user-agent data of the request. Not sure if this is suitable for material-ui though.

@MrOrz MrOrz changed the title Auto-prefixing breaks server-side rendering, checksum mismatch. Auto-prefixing breaks server-side rendering, warns "checksum mismatch". Jun 4, 2015
@MrOrz MrOrz changed the title Auto-prefixing breaks server-side rendering, warns "checksum mismatch". Auto-prefixing breaks server-side rendering with "checksum mismatch". Jun 4, 2015
@MrOrz
Copy link
Author

MrOrz commented Jun 4, 2015

Oops, didn't notice #748 . Closing this.

@MrOrz MrOrz closed this as completed Jun 4, 2015
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

No branches or pull requests

3 participants