1

Deals.js

import {Tab, Nav, NavItem} from 'react-bootstrap';
const Deals = (props) => {
  return (
<div>
<Tab.Container id="tabs-with-dropdown" defaultActiveKey="first">
  <Nav bsStyle="tabs">
    <NavItem eventKey="first">
      <span>props.hedding1</span>
    </NavItem>
    <NavItem eventKey="second">
      <span>props.hedding2</span>
    </NavItem>
  </Nav>
  <Tab.Content animation>
    <Tab.Pane eventKey="first">
      <span>Tab 1 content</span>
    </Tab.Pane>
    <Tab.Pane eventKey="second">
      <span>Tab 2 content</span>
    </Tab.Pane>
  </Tab.Content>
</Tab.Container>

<Tab.Container id="tabs-with-dropdown" defaultActiveKey="first">
  <Nav bsStyle="tabs">
    <NavItem eventKey="first">
      <span>Tab 1</span>
    </NavItem>
    <NavItem eventKey="second">
      <span>Tab 2</span>
    </NavItem>
  </Nav>
  <Tab.Content animation>
    <Tab.Pane eventKey="first">
      <span>Tab 1 content</span>
    </Tab.Pane>
    <Tab.Pane eventKey="second">
      <span>Tab 2 content</span>
    </Tab.Pane>
  </Tab.Content>
 </Tab.Container>
</div>
);
};
export default Deals;

我收到这样的错误:

警告:React.createElement:类型不应为 null、未定义、布尔值或数字。它应该是一个字符串(对于 DOM 元素)或一个 ReactClass(对于复合组件)。检查 Deals.

给出的错误是:

不变违规:元素类型无效:预期为字符串(对于内置组件)或类/函数(对于复合组件),但得到:未定义。检查Deals.

4

0 回答 0