1

I'm using React-bootstrap package on my Keystone.JS project. To test I tried putting a button in my index page. However, I get the following warning:

Warning: Unknown props bsStyle, active, block, navItem, navDropdown, bsClass on tag. Remove these props from the element.

This is the code where I use Button:

var React = require('react');
var Layout = require('../../layouts/defaultLayout');
var ReactDOMServer = require('react-dom/server');
var Button = require('react-bootstrap').Button;

module.exports = React.createClass({
    render: function () {
        return (
            <Button bsStyle="primary">Default button</Button>
        );
    }
});

What am I missing? Thanks for the help.

1

1 Answer 1

2

Long story short

Many component libraries (including react-bootstrap see issue) were relying on passing custom properties to DOM elements w/o data- prefix.

Starting 15.2.0 React warns about unknown properties on DOM element

Add warning for unknown properties on DOM elements. (@jimfb in #6800, @gm758 in #7152)

You need to update library. This was fixed in v0.30.0-rc.1.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah thanks! Actually I saw the action live with my eyes just a while ago (the comments on this issue were as recent as minutes or hours ago).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.