我正在尝试在创建-重新应用程序.In中将react-router与reactstrap一起使用我需要为reactstrap使用状态的路由页面,因此我将路由器从变量转换为类。我收到以下警告:警告: validateDOMNesting(...):
我不知道该怎么做,我需要用reactstrap设置路由器导航的样式,所以我按照你下面看到的做了。
有很多原因导致这个方法不起作用:
anywords
(a bunch of li not relevant)
anywords
(then just more of the above)
other than a couple of li coming close to each other at random times and me having to refresh the page sometimes instead of the normal behaviour (auto refresh ) and the warning message i get in the console ,nothin bad happens but when i read about this issue i found out that i shouldn't do it.
发布于 2019-09-15 09:23:38
添加
将属性(以前称为componentClass)添加到原始NavLink以保持样式不变,同时使警告保持静音。
https://react-bootstrap.netlify.com/components/navs/#nav-link-props
或者
查看屏幕截图
原件:
新增:
https://stackoverflow.com/questions/55625431
复制相似问题