Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap React应用程序内的引导导航_Twitter Bootstrap_Reactjs_Twitter Bootstrap 3_Electron - Fatal编程技术网

Twitter bootstrap React应用程序内的引导导航

Twitter bootstrap React应用程序内的引导导航,twitter-bootstrap,reactjs,twitter-bootstrap-3,electron,Twitter Bootstrap,Reactjs,Twitter Bootstrap 3,Electron,我正在尝试在React+Electron应用程序中实现引导导航 这是我编写的JSX代码: render: function () { if (this.state.loading) { return ( <div className="jumbotron"> <h1 className="display-3">Let us load your data</h1> <p>It may take

我正在尝试在React+Electron应用程序中实现引导导航

这是我编写的JSX代码:

render: function () {
  if (this.state.loading) {
    return (
      <div className="jumbotron">
        <h1 className="display-3">Let us load your data</h1>
        <p>It may take a while</p>
      </div>
    );
  }

  return (
    <div>
      <ul className="nav nav-pills nav-stacked">
        <li role="presentation" className="active">
          <a href="#">
            Home
          </a>
        </li>
        <li role="presentation">
          <a href="#">
            Profile
          </a>
        </li>
      </ul>
    </div>
  );
}
这一个工作原理与预期一致:


是否有任何原因导致导航无法工作?

尝试使用react-bootstrap.link-

项目使用的是引导4,而不是我认为的引导3…

为什么我需要它?我只是把Bootstrap用作CSS库。你能发布整个render()方法吗?我现在已经完成了。我看不出你的代码有任何问题,你能和DOM检查器检查一下DOM的渲染是否正确吗?它的渲染就像我想让它
。我可以在我的源代码或网络开发工具选项卡中看到bootstrap.css,其中包含关于
.nav pills
.nav stacked
的规则……我刚刚创建了一个JSFIDLE,一切正常,也许你可以与你的代码进行比较
return (
  <div>
    <table className="table table-striped table-bordered">
      <tbody>
        <tr>
          <th>1</th>
          <th>2</th>
          <th>3</th>
        </tr>
        <tr>
          <td>4</td>
          <td>5</td>
          <td>6</td>
        </tr>
        <tr>
          <td>7</td>
          <td>8</td>
          <td>9</td>
        </tr>
      </tbody>
    </table>
  </div>
);