简体   繁体   English

反应 material-ui domnesting

[英]react material-ui domnesting

It's really become a pain seeing this much warning s regarding DOMNesting and I couldn't do anything to get rid of 'em all in one place so here is a typical example of this看到这么多关于DOMNestingwarning真的很痛苦,我无法做任何事情来在一个地方摆脱它们,所以这里是一个典型的例子

Warning: validateDOMNesting(...): <table> cannot appear as a descendant of <p>.
table ...

Is there any config or command so they all could vanish all of a sudden?是否有任何配置或命令可以让它们突然消失?

Best way to remove the warnings is to fix the code and bringing out the table element from p element.删除警告的最佳方法是修复代码并从p元素中取出table元素。 But anyway You can use this line to hide all console warnings:但无论如何您可以使用这一行来隐藏所有控制台警告:

console.warn = () => {};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM