meteor – react-bootstrap:关于未知道具的警告

栏目: Node.js · 发布时间: 5年前

内容简介:翻译自:https://stackoverflow.com/questions/38175958/react-bootstrap-warnings-about-unknown-props

我不确定为什么,但我注意到我的浏览器控制台中有很多关于未知道具的警告.以下是一些警告:

"Warning: Unknown prop `navbar` on <ul> tag. Remove this prop from the element. For details, see 
    in ul (created by Nav)
    in Nav (created by NavbarWrapper)
    in div (created by NavbarWrapper)"

"Warning: Unknown prop `divider` on <a> tag. Remove this prop from the element. For details, see 
    in a (created by SafeAnchor)
    in SafeAnchor (created by MenuItem)
    in li (created by MenuItem)
    in MenuItem (created by NavbarWrapper)
    in ul (created by DropdownMenu)
    in DropdownMenu (created by Dropdown)
    in li (created by Dropdown)
    in Dropdown (created by Uncontrolled(Dropdown))
    in Uncontrolled(Dropdown) (created by NavDropdown)
    in NavDropdown (created by NavbarWrapper)
    in ul (created by Nav)
    in Nav (created by NavbarWrapper)"

NavbarWrapper是我写的一个反应组件,它呈现了一个react-bootstrap导航栏.

我今天(2016年7月4日)才开始注意到这些警告.但是,导航栏按预期工作.

我使用流星1.3.4.1,反应15.1.0,反应引导0.29.5

如果我做错了什么可以请有人告诉我吗?

不是真正的答案(新用户,还不能发表评论)但似乎 react recently upgraded to version 0.15.2

和部分变化发出了将未知元素(或道具)传递给dom的警告.

这不会破坏您的UI,但会在浏览器控制台中包含恼人的警告日志.

其他相关链接: https://github.com/react-bootstrap/react-bootstrap/issues/1970

翻译自:https://stackoverflow.com/questions/38175958/react-bootstrap-warnings-about-unknown-props


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Machine Learning

Machine Learning

Kevin Murphy / The MIT Press / 2012-9-18 / USD 90.00

Today's Web-enabled deluge of electronic data calls for automated methods of data analysis. Machine learning provides these, developing methods that can automatically detect patterns in data and then ......一起来看看 《Machine Learning》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具