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

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

内容简介:翻译自: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


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

查看所有标签

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

Programming Ruby

Programming Ruby

Dave Thomas、Chad Fowler、Andy Hunt / Pragmatic Bookshelf / 2004-10-8 / USD 44.95

Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the......一起来看看 《Programming Ruby》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试