title: Sticky navigation bar -React
body: <p>I am currently working on making a portfolio. I want to have a navigation bar on the top. Once you click on a tab on the navigation bar, it will scroll you down to that particular page and the navigation bar will stick on the top. I am currently using react-scroll. However, I need suggestions on how I can make the navigation bar stick on the top while scrolling down. 
  Right now, my code looks something like this:</p>
  
  <pre><code>import { Link} from "react-scroll";
  class Navbar extends Component {
    render() {
      return (
        &lt;section id="nav-bar"&gt;
          &lt;nav className="navbar navbar-default navbar-fixed-top"&gt;
            &lt;div className="navbar"&gt;
              &lt;ul
              &gt;
                &lt;li&gt;
                  &lt;Link
                    activeClass="active"
                    to="home"
                    spy={true}
                    smooth={true}
                    offset={-70}
                    duration={500}
                  &gt;
                    Home
                  &lt;/Link&gt;
                &lt;/li&gt;
                &lt;li&gt;
                  &lt;Link
                    activeClass="active"
                    to="demo"
                    spy={true}
                    smooth={true}
                    offset={0}
                    duration={500}
                  &gt;
                    Demo
                  &lt;/Link&gt;
                &lt;/li&gt;
                &lt;li&gt;
                  &lt;Link
                    activeClass="active"
                    to="process"
                    spy={true}
                    smooth={true}
                    offset={-70}
                    duration={500}
                  &gt;
                    Process
                  &lt;/Link&gt;
                &lt;/li&gt;
              &lt;/ul&gt;
            &lt;/div&gt;
          &lt;/nav&gt;
        &lt;/section&gt;
      );
    }
  }
  </code></pre>
  
  <p>In my App.js I only return all the pages in a div</p>
  
  <pre><code>      &lt;div&gt;
          &lt;Navbar /&gt;
          &lt;HomePage /&gt;
          &lt;DemoPage /&gt;
          &lt;ProcessPage /&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>Will appreciate any type of help or suggestion. Should I use anything else other than react-scoll?. Thanks!</p>