title: How to use react-router-dom v6 navigate in class component
body: <p>I installed react-router-dom v6 and I want to use a class based component, in previous version of react-router-dom v5 <code>this.props.history()</code> worked for redirect page after doing something but this code not working for v6 .</p>
  <p>In react-router-dom v6 there is a hook <code>useNavigate</code> for functional component but I need to use it in class base component , Please help me how to use navigate in class component ?</p>