title: How to use history library and <Link> in React
body: <p>I'm a beginner with React-Redux, and I had a question of how to use history and the Link tag in order to push to a certain location.</p>
  
  <p>I wanted to be able to use history.push in my actions, so I used the <a href="https://www.npmjs.com/package/history" rel="nofollow noreferrer">history JS library</a>. I created a history.js file in my app folder:</p>
  
  <p>src/history.js</p>
  
  <pre><code>import { createBrowserHistory } from 'history';
  export default createBrowserHistory();
  </code></pre>
  
  <p>I then imported the history object into my App.js, and had my routes placed within a Router tag with history:</p>
  
  <p>src/App.js</p>
  
  <pre><code>&lt;Router history={history}&gt;
  
        &lt;Switch&gt;
          &lt;Route path="/loginscreen" component={Loginscreen} /&gt;
          &lt;Route path="/login" component={Login} /&gt;
          &lt;Route path="/Property-Assistant-2018/profile" component={Profile} /&gt;
          &lt;Route path="/Property-Assistant-2018/properties" component={Property} /&gt;
          &lt;Route path="/Property-Assistant-2018/detail/:id" render={(props)=&gt;&lt;PropertyDetail{...props}/&gt;} /&gt;
          &lt;Route path="/Property-Assistant-2018/new_property" component={NewProperty} /&gt;
          &lt;Route path="/Property-Assistant-2018/register" component={Register} /&gt;
          &lt;Route path="/Property-Assistant-2018/contact" component={Message} /&gt;
          &lt;Route path="/Property-Assistant-2018/edit_property/:id" render={(props)=&gt;&lt;EditProperty{...props}/&gt;}/&gt;
          &lt;Route path="/Property-Assistant-2018" component={Initial} /&gt;
  
        &lt;/Switch&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, now my Link tags in my nav bar do not work. When I click on them, they just stay at the inital homepage. I tried adding a second set of Switch routes, to see if I can hardcode it and figure out what was going on, but that made the homepage appear stacked on top of the Link route page.</p>
  
  <p>src/App.js</p>
  
  <pre><code>&lt;Link to="/Property-Assistant-2018/contact"&gt;Contact&lt;/Link&gt;
  </code></pre>
  
  <p>So my question is, how can I use history and Link tags at the same time? I know history is included with React-Router v.4, and I've been using this, but I can't use it for my actions. </p>
  
  <p>It's probably a simple fix, so thank you for helping me with this issue. </p>