Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-bootstrap: Warnings about unknown props

I'm not sure why but I am noticing a lot of warnings in my browser console regarding unknown props. Following are some of the warnings:

"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 is a react component that I wrote which renders a react-bootstrap navbar.

I only started noticing these warnings as of today (July 4, 2016). However, the navbar is working as expected.

I am using meteor 1.3.4.1, react 15.1.0, and react-bootstrap 0.29.5

Can please somebody let me know if I am doing something wrong?

like image 995
cpeng Avatar asked Jul 04 '16 01:07

cpeng


2 Answers

Not really an answer(new user, can't comment yet) but it seems that react recently upgraded to version 0.15.2 and part of the changes was giving off a warning for passing a unknown elements(or props) to dom.

This won't break your UI but would include annoying warning logs to your browser console.

Additional relevant links: https://github.com/react-bootstrap/react-bootstrap/issues/1970

like image 160
Kael Vergara Avatar answered Sep 30 '22 22:09

Kael Vergara


I downgraded to v15.0.1 of React, and now all is fine again. The warnings actually broke my app, so a downgrade was necessary :(

like image 31
gypsyDev Avatar answered Sep 30 '22 22:09

gypsyDev