Server rendered React component class name automatically changed causing styling issue

扶醉桌前 提交于 2019-12-10 18:19:30

问题


I am using React 16 in my personal project (https://github.com/sachinjha1/react-redux-hapi-fullstack-starter/blob/master/package.json).

I implemented SSR which works fine on my local. When i test the same app on Heroku all my styling are missing. When i did view source of server rendered html then i noticed that class names are different when rendered from Heroku.

Heroku App URL -> https://raxpi.herokuapp.com/ In above heroku url in browser if you check view source you can see that class names are like C2, C6 etc... On my local i can see those class names exactly from Material UI. Because if this difference app in Heroku looks off style. Not sure how its happening.

来源:https://stackoverflow.com/questions/47567131/server-rendered-react-component-class-name-automatically-changed-causing-styling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!