react 在服务端渲染 使用material-ui Warning
在 react 构建项目的时候 使用了 服务端渲染
当加入了 material-ui
的时候 出现了 Warning
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) tyle="did-flip:true;-webkit-tap-highligh
(server) tyle="did-flip:true;tap-highlight-color:
material-ui
<TextField
style={styles.textfield}
hintText="用户名"
underlineFocusStyle={{borderColor: Colors.amber900}}
defaultValue="" /><br/>
<TextField
hintText="密码"
floatingLabelText="Password"
type="password" /><br/>
<RaisedButton
style={styles.textfield}
label="登录" secondary={true} /><br/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
autoprefixer需要设置ua来编译对应的前缀
参考:
http://www.material-ui.com/#/get-started/server-rendering