您好我正在尝试使用React-Bootstrap中的自定义标签。 https://react-bootstrap.github.io/components.html#tabs
我得到的错误是
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method
我的代码:
import React from 'react';
import { Tab,Row,Col,Nav,NavItem } from 'react-bootstrap';
export default class ControlledTabs extends React.Component {
render() {
return (
<Tab.Container id="left-tabs-example" defaultActiveKey="first">
<Row className="clearfix">
<Col sm={4}>
<Nav bsStyle="pills" stacked>
<NavItem eventKey="first">
Tab 1
</NavItem>
<NavItem eventKey="second">
Tab 2
</NavItem>
</Nav>
</Col>
<Col sm={8}>
<Tab.Content animation>
<Tab.Pane eventKey="first">
Tab 1 content
</Tab.Pane>
<Tab.Pane eventKey="second">
Tab 2 content
</Tab.Pane>
</Tab.Content>
</Col>
</Row>
</Tab.Container>
);
}
}
请让我知道我做错了什么,谢谢