warning.js?169357b:36 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) mini md-transition--decceleration md-bac
(server) mini md-transition--acceleration md-back
Here is the minimal reproduction code snippet:
import NavigationDrawer from 'react-md/lib/NavigationDrawers'
export default class extends React.PureComponent {
render() {
return (
<NavigationDrawer
navItems={[]}
drawerType={NavigationDrawer.DrawerTypes.PERSISTENT_MINI}
>
<div>Test</div>
</NavigationDrawer>
)
}
}
As far as I can tell, the cause is the miniDrawer, which gets rendered visible and with a wrong drawer type (it uses default full_height type): https://github.com/mlaursen/react-md/blob/05f5b39641b6c452ea89f851be642467716b863f/src/js/NavigationDrawers/NavigationDrawer.js#L900
Ahh, I think this is actually because the mini drawer should always be visible. When it mounts in the browser, it correctly updates to visible and you get the diff. I'll update this correctly
I just want to confirm that the fix works like a charm using the latest release/1.0.x branch. Thank you!
Is this really solved in the v1.0.18 @mlaursen? I'm getting an invalid checksum also in a really similar problem involving NavigationDrawer with MINI.
(client) Title