meteorreactjsmaterial-uiflow-router

Flow router ssr , meteor and material ui


Im using meteor 1.4 and material ui with react and im getting this error

warning.js: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) ;width:100%;display:flex;padding-left:24 (server) ;width:100%;display:-webkit-box,-moz-box

How do I fix this?


Solution

  • See: this issue was discussed here

    You need to use the same process.env.NODE_ENV on the client and on the server.

    Solution: use webpack (or browserify) :

    new webpack.DefinePlugin({
    process: {
        env: {
            NODE_ENV: JSON.stringify(process.env.NODE_ENV)
        }
    }})
    

    For more info: http://www.material-ui.com/#/get-started/server-rendering