title: React. Redirect by button click in React with react-router-dom
body: <p>So, I try to understand how can I make right redirection in my app with event clicks? I put the <code>react-router-dom</code> redirect logic into the button <code>event handler</code>, but it does not work.</p>
  
  <p>What is I'm making wrong?</p>
  
  <pre><code>import React, { Component, Fragment } from 'react';
  import Preloader from '../Preloader/Preloader'
  import preloaderRunner from '../../Modules/PreloaderRunner'
  import { Redirect } from 'react-router-dom';
  import axios from 'axios';
  
  class LoginPage extends Component {
      constructor(props) {
          super(props);
          this.state = {
              navigate: false
          }
      }
  
      handleClick = () =&gt; {
          console.log('Button is cliked!');
          return &lt;Redirect to="/employers" /&gt;
      }
  
      render() {
          return (
              &lt;Fragment&gt;
                  &lt;Preloader/&gt;
                  &lt;h1&gt;This is the Auth Page!&lt;/h1&gt;
                  {this.state.navigate === true
                  ? &lt;div&gt;
                      &lt;div&gt;You already loggined!&lt;/div&gt; 
                      &lt;button onClick={this.handleClick}&gt;Go to the Employers List!&lt;/button&gt;
                    &lt;/div&gt;
                  : &lt;div&gt;
                      &lt;form&gt;
                         // some code...
                      &lt;/form&gt;
                  &lt;/div&gt;}
              &lt;/Fragment&gt;
          )
      }
  }
  
  export default LoginPage;
  </code></pre>