-
Notifications
You must be signed in to change notification settings - Fork 76
Server Rendering - Invalid Checksum: Browser Prefixes #2
Comments
As I understand, Radium, which I use here, takes care of vendor prefixes. I don't know how it works with server rendering though, haven't try that (as well as server rendering per se). Also, can it be covered with tests? |
I think Radium only adds prefixes on client side code? My use case was attempting to work with the latest redux-devtools which recommend using react-dock as a wrapper. After digging deeper I've found this which may work as a solution https://github.com/UXtemple/babel-plugin-react-autoprefix... will keep posting here regarding whether it works or not to keep the rendering consistent between server and client. [edit]: does not solve the issue Re tests: I would assume you can stub the calls to the third party library functions with identity functions and trust the tests of the library -- or just use spys. Then the existing assertions would not need any modifications. |
BTW, why would you want to render devtools server-side at all? Just wonder :) |
For developing in a universal app. Otherwise you'll get invalid checksum. |
@tomatau I've changed prefixing, can you check if it works with server rendering? |
Prefixes look good now for me, but now the dock has css empty value Given that I use async actions which get resolved on the server side, the devtools state will still be out of sync, as the multiple states generated by serverside actions are not passed along. |
Yeah, I just traced this same The problem is that this code will set Line 106 in c8b5c5e
{left: false} which react will end up as an empty value. Of course there isn't a way to get the browsers actual fullWidth on the server so that value will always be missing. @msokk workaround is correct, currently any position besides right will work fine.
I do wonder why when the dock is set to the right side it calculates a left css property instead of just setting |
@natelaws it's done that way for proper animation between left-top-right-bottom states, if I recall it right |
fullWidth is false in the server side, but fullWidth is 1920 in the browser. Can we get this fixed? Well the workaround right now is that I will use "left" position. |
Hi, I've just noticed what appears to be the same problem with Server-side rendering. "Warning: Prop The error manifests by creating an invisible box on the left side of the screen that prevents click-through. Opening / showing the Dock fixes the issue. When navigating user Client-side no error / issue. Component: <Dock
position="right"
isVisible={this.state.isVisible}
fluid
dimMode="none"
size={0.4}
> Full console error:
Could anyone let me know if there is a workaround / fix for this as I can't switch the dock to the left hand side without breaking the layout? Thanks a lot Alex |
Currently certain styles required a browser prefix that is added by ReactDOM. When rendering through the ReactDOMServer, these prefixes aren't added and we get an invalid checksum.
Any suggestions for dealing with this?
Perhaps this library could use https://github.com/cgarvis/react-vendor-prefix ?
The text was updated successfully, but these errors were encountered: