title: react-router-dom - Difference between link and history.push?
body: <p>The difference between href and link I understand.</p>
  
  <p>But I want to know the difference between using the link and withrouter with history.push?
  If I have already accessed the page does history.push retrieve the page in the cache?</p>
  
  <p>Using Link:</p>
  
  <pre><code>&lt;Link className="btn btn-primary" onClick={logout} to="/"&gt;
   Log out
  &lt;/Link&gt;
  </code></pre>
  
  <p>Using history:</p>
  
  <pre><code>constructor(props) {
          super(props);
          this.handleLogout = this.handleLogout.bind(this);
      };
  
      handleLogout(e) {
          const { history } = this.props;
          logout()
          history.push("/");
  
      }
  &lt;button type="button" onClick={this.handleLogout}&gt;Log out&lt;/button&gt;
  </code></pre>